源代码如下:
using (SqlConnection conn = new SqlConnection(this.GetConnectionString(this.WMPDBName)))
{
SqlCommand cmd = conn.CreateCommand();
cmd.CommandType = System.Data.CommandType.StoredProcedure;
cmd.CommandText = "存储过程名称";
////输出参数
cmd.Parameters.Add(new SqlParameter("@DeleteTotal", System.Data.SqlDbType.Int));
cmd.Parameters["@DeleteTotal"].Direction = System.Data.ParameterDirection.Output;
cmd.Parameters.Add(new SqlParameter("@InsertTotal", System.Data.SqlDbType.Int));
cmd.Parameters["@InsertTotal"].Direction = System.Data.ParameterDirection.Output;
//// 输入参数【方式一】
cmd.Parameters.Add(new SqlParameter("@PageIndex", System.Data.SqlDbType.Int));
cmd.Parameters["@PageIndex"].Direction = System.Data.Para