public Int64 getRemFees(Int64 r_id)
{
Int64 fee = 0;
try
{
string str = "getRemFees";
scmd.CommandText = str;
scmd.CommandType = CommandType.StoredProcedure;
scmd.Connection = scon;
SqlParameter rid = new SqlParameter("@rid", r_id);
SqlParameter re = new SqlParameter("@rem", SqlDbType.BigInt);
scmd.Parameters.Add(rid);
scmd.Parameters.Add(re);
scmd.Parameters["@rem"].Direction = ParameterDirection.Output;
if (scon.State == ConnectionState.Closed)
scon.Open();
sdr= scmd.ExecuteReader();
if (sdr.Read())
fee = Convert.ToInt64(scmd.Parameters["@rem"].Value);
if (scon.State == ConnectionState.Open)
scon.Close();
}
catch (Exception ex)
{
MessageBox.Show("DataBase Error : " + ex.Message, "Database", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
return fee;
}