public void Insert_tmpStock_Card(tmp_Stock_CardBEL scbel, string Prod_code,out string tmp, out string transid)
{
if (cn.State != ConnectionState.Open)
cn.Open();
cmd.Connection = cn;
cmd = new SqlCommand("SP_StockItem_Insert_tmpStock_Card", cn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@comp_id", scbel.Comp_id);
cmd.Parameters.AddWithValue("@uid", scbel.Uid);
cmd.Parameters.AddWithValue("@prod_code", Prod_code);
dr = cmd.ExecuteReader();
while (dr.Read())
{
tmp = dr["type"].ToString();
transid = dr["sid"].ToString();
}
dr.Close();
}
Call the above method as below.
ClassName objClassName = new ClassName();
objClassName.Insert_tmpStock_Card(tmp_Stock_CardBEL scbel, Prod_code,out tmp, out transid)
After calling this method, you will be having two expected values in tmp, transid.
That's it!