using (SqlCommand cmd = new SqlCommand("sp_getrewardincome", con))
{
cmd.CommandType = CommandType.StoredProcedure;
SqlDataAdapter ad = new SqlDataAdapter(cmd);
cmd.Parameters.AddWithValue("@id", id);
cmd.Parameters.AddWithValue("@type", "update");
dt = new DataTable();
ad.Fill(dt);
}
using (SqlCommand cmd = new SqlCommand("sp_getrewardincome", con))
{
cmd.CommandType = CommandType.StoredProcedure;
SqlDataAdapter ad = new SqlDataAdapter(cmd);
cmd.Parameters.AddWithValue("@id", id);
cmd.Parameters.AddWithValue("@type", "update");
//cmd.Parameters.Add("@result", SqlDbType.NVarChar, 3000);
//SqlParameter ptr = cmd.Parameters["@result"];
//ptr.Direction = ParameterDirection.Output;
con.Open();
cmd.ExecuteNonQuery();
}
No comments:
Post a Comment