how do you generate source code for the automatic generation
for receipt number
Answer Posted / 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 View All Answers
kindly send interview materials
1. How many jobs can we write in a single file? 2. How many maximum members can exist in a single partition data set(pds) in jcl?
i want to insert textbox value to sql db. i have only one text box but store four values. ple give any one give sample code in asp.net c#..
How to set on/off a group of indicators in a single statement?
What is the difference between DECISION COVERAGE(DC) and MODIFIED CONDITION/DECISION COVERAGE(MCDC)?
Write a shell program. Enter number of days from keyboard. Find out the number of years, month and days it contains
What do you understand by modular programming?
how can i split string in a textbox in windows appication using C#.net
how to data grid use in data bind?
we create a pf with 3 fields.2 is defined as keyfields.we lock it with alcobj command.how we find out whether the file is locked or not?is it dspfd??/
hi, all this is shoba m.c.a . i have learned abap but no oppurtunities right now as fresher , right now i want to learn any course on demand any one pls suggest me good course and institute in hyderabad
what is radio button? Plz show code this! how will select radio buttons to go next window Forms? Supose o radio button1 o radio button2 o radio button3 o radio button4 how will coding this? Plz explain this!
i am exeprienced person what is selection process
What is the meaning of client-server application. The purpose of Client-Server Application. with description.
differences between qtp10.0 and 11.0 ?