public int getrecentpayment(int id)
{
int res = 0;
con.Open();
cmd = new SqlCommand("spgetrecentpayment", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter[] parms = new SqlParameter[1];
parms[0] = cmd.Parameters.Add("@theaterid", SqlDbType.Int, 4);
parms[0].Value = id;
dr = cmd.ExecuteReader();
if (dr.Read())
{
this.arears = Convert.ToInt16(dr["arears"].ToString());
this.dues = Convert.ToInt16(dr["dues"].ToString());
res = 1;
con.Close();
}
con.Close();
return res;
}
No comments:
Post a Comment