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

through which algorithm does the garbage collector works? how the garbage collector will understand that the object will going to be deleted?

0 Answers   Motorola,


What is the difference between procedure -oriented language and object oriented language?

22 Answers   IBM, Infosys, TCS,


What is the difference between CLEAR & RESET and OPEN & CLOSE OPCOEDS(USING RPG/400).wheare we can use this?can any body tell me in real time senario with example please?

0 Answers  


Tell me the jobs for the MCA Fresher in delhi, Noida..

0 Answers  


if we want to move all the items that are already added in a combobox into an empty list box or vice-versa then how can it possible in vb or C# ?

1 Answers  


What is the Difference between in memory database and physical database

0 Answers  


What are the compilers of JAVA and .NET Programming languages?

1 Answers   HCL, Microsoft,


what is the difference between "types" and "data" in abap.

4 Answers   Tech Soft,


What is Partial class and its use?

1 Answers  


Data structure used to impliment a menu:

0 Answers   Verifone,


smal talk is pure object oriented or not?

0 Answers  


how MATLSB software suitable for electrical branch? which tools are useful??

1 Answers  


Categories