Jyoti Jodha

Jyoti Jodha

  • NA
  • 1.7k
  • 408.5k

How to generate bill number show in Textbox from database c

Jun 12 2017 4:27 AM

How to generate  bill number show in Textbox from database in c#

what change in this code to show billno in textbox
 
private int billno(string p)
{
Int32 Billno = 0;
cmd = new SqlCommand(p, con);
con.Open();
Billno = (Int32)cmd.ExecuteScalar();
con.Close();
return Billno;
// int billno = 0;
//billno = billno + 1;
//txt_billno.Text = billno.ToString(p);
}
 
int Billno = billno("Select ISNULL(Max(Billno+1),1) From MainBillForm"); 

Answers (3)