private void PackingIDFill()
{//----Fill Packing Id AutoGen
string msid = " SELECT ISNULL(MAX(PackingId),0) FROM dbo.PackingList";
SqlDataAdapter da = new SqlDataAdapter(msid, con);
DataTable dt = new DataTable();
da.Fill(dt);
Int32 a = Convert.ToInt32(dt.Rows[0][0].ToString());
a++; ;
txtPackingId.Text = a.ToString();
}
{//----Fill Packing Id AutoGen
string msid = " SELECT ISNULL(MAX(PackingId),0) FROM dbo.PackingList";
SqlDataAdapter da = new SqlDataAdapter(msid, con);
DataTable dt = new DataTable();
da.Fill(dt);
Int32 a = Convert.ToInt32(dt.Rows[0][0].ToString());
a++; ;
txtPackingId.Text = a.ToString();
}
No comments:
Post a Comment