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
How can we develop a multi-tier application in Java?
What is the entry point function of a DLL?
Hello...has anyone interviewed with Information Management Services(IMS)located in Silver Spring MD??If yes,what can you share about the programming test and the analytical test?
10.Define filters,binary to hexadecimal,hexadecimal to decimal?
what is the use of occurs 10 or (any number) in the internal table declaration with header line.
what is the meaning of without standing arrears?
hai i am prasanna.I am MCA 2009 fresher.tell me about certifications.which certification helps me to improve my carrier and to get a technically oriented job ,which certification helps to get job faster.
along with oracle which language will be beneficial to have knowledge with,java,.net,since i m doing oracle have appeared for 8th sem BEIT,plz suggest
How to change the color of a cell or a row in a datagrid on mouse hover using javascript/.net
Tips for blog integration by www.esteemwebsolutions.com. Can Any body suggest me to how to make wonderful questions on web integration..
how can we implement locks in plsql?
there are N number of matchboxes numbered 1...N.each matchbox contain various number of stick.Two player can alternatevely pick some amount of stick from the higest stick containing box . The player is condidered win if there is no stick after his move.Find the final move so that the move player win. Note:In case the number of stick is equal ,pick the stick from the higest numbered box. eg: 3 box contain stick as:1,1,1. if u take 1 stick from 3rd numbred box you will any how win the match.
what is the diffrence between software and hardware language?
V2 SOLUTIONS APTI paper is very easy there are 3 sections 1'st is quant problem on age train traveling speed is given length of train is given we have to find out length of bridge then prob on calender one date is given on Friday hv to find out day of othe date ans is Friday then there was 1 prob on percentage which was very easy ans was 21340 then 2’nd section was english grammer had has been being like that hv to fill in the blanks was very wasy then last section was find relative words there was five Q 1 pant ANS:-breath 2inquire ans :- ask And 3 more out of that 1 ‘s ans was:- body 4 And others ans was :-through THEN THEY HAVE GD There was three topics 1 should we allow india’s talent to go to abrod 2 protest against seperate state is justify 3 inturuption of politics in cricket Thats all guys i cleared both the rounds now preparing 4 interview best of luck
What's the difference b/w Table & Templete in Smartform?