Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


how do you generate source code for the automatic generation
for receipt number



how do you generate source code for the automatic generation for receipt number..

Answer / raviarsenal

C # in form load paste this code


try
{
SqlConnection con = new SqlConnection
(@"Data Source=.\sqlexpress;Initial
Catalog=Hospital;Integrated Security=True");
con.Open();
q = "select Billno from PatientBill";
SqlCommand cmd = new SqlCommand(q, con);
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
bill = Convert.ToInt32(dr
["Billno"].ToString());
}
txtbillno.Text = (bill + 1).ToString();
dr.Close();
cmd.Dispose();
con.Close();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Programming Languages AllOther Interview Questions

write a sql qwery which include joining of two tables 4 marks mainframe

0 Answers  


what is inprocess and outprocess in vb

1 Answers   Msoft,


how can we implement locks in plsql?

0 Answers  


what is adodb??y it is used for connection of V.B and access??what is ado?dao?

0 Answers   TCS,


What language / script is used to validate web page

3 Answers  


WAP to print all prime nos between 1 to 100 without using user input...pls reply within few hours...

1 Answers  


when will triggars the at new event in abap and web dybn pro?

0 Answers   TCS,


iam confused to choose among testing, .net and java can anybody help me????????

0 Answers  


How to convert numeric value into words in c#????plz suggest me the coding of this question???

1 Answers   NIIT,


Can anyone send me NIC question papers alongwith answers on nidhi1485@yahoo.co.in? Urgently needed.. Thanks in advance

0 Answers  


How to find out the user exit for va01.

1 Answers  


if there are n nodes in a binary tree, how many null pointers are there?

4 Answers   Hughes,


Categories