|
Full code:
SqlConnection cnn = new SqlConnection (ConfigurationSettings.AppSettings ["ConnectionString"]);
SqlCommand _comm = new SqlCommand ("proc_ListPageInt", cnn);
_comm.CommandType = CommandType.StoredProcedure;
SqlDataReader dr = null;
_comm.Parameters.Add ("@ tblName", SqlDbType.NVarChar, 200);
_comm.Parameters ["@ tblName"]. Value = "info_public";
_comm.Parameters.Add ("@ fldName", SqlDbType.NVarChar, 500);
_comm.Parameters ["@ fldName"]. Value = "";
_comm.Parameters.Add ("@ pageSize", SqlDbType.Int);
_comm.Parameters ["@ pageSize"]. Value = 5;
_comm.Parameters.Add ("@ page", SqlDbType.Int);
_comm.Parameters ["@ page"]. Value = 1;
_comm.Parameters.Add ("@ fldSort", SqlDbType.NVarChar, 200);
_comm.Parameters ["@ fldSort"]. Value = "infoid";
_comm.Parameters.Add ("@ Sort", SqlDbType.Bit);
_comm.Parameters ["@ Sort"]. Value = "1";
_comm.Parameters.Add ("@ strCondition", SqlDbType.NVarChar, 1000);
_comm.Parameters ["@ strCondition"]. Value = "";
_comm.Parameters.Add ("@ ID", SqlDbType.NVarChar, 150);
_comm.Parameters ["@ ID"]. Value = "infoid";
_comm.Parameters.Add ("@ Counts", SqlDbType.Int, 0);
_comm.Parameters ["@ Counts"]. Direction = ParameterDirection.Output;
_comm.Parameters.Add ("@ pageCount", SqlDbType.Int, 0);
_comm.Parameters ["@ pageCount"]. Direction = ParameterDirection.Output;
cnn.Open ();
_comm.ExecuteNonQuery (); |
|