how do you generate source code for the automatic generation
for receipt number
Answers were Sorted based on User's Feedback
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 |
Answer / Sunil Kumar Bhagat
To generate a sequential receipt number automatically, you can use various programming languages. Here's an example in PHP:
```php
function generateReceiptNumber() {
static $number = 1;
return ++$number;
}
```
This function will return a unique sequential receipt number each time it is called.
| Is This Answer Correct ? | 0 Yes | 0 No |
Describe the following: (i) DNS (ii) Name Resolution (iii) Subnet Masking (iv) Urgent Pointer
Programs in JAVA to get the remainder and quotient of given two numbers without using % and / operators?
Is the IT field raise again? What is the position of IT after 4 years?
give idea for creating screen in abap
5. How do you round the addition or subtraction of two numbers in assembler?
Diff between %let and Call symput?
Number of null pointers in any binary tree
I've an application where i need to give access to all the features only to admin and only few features to normal users. Say Menu...i dont want all my menu items to be accessible to all the users only the admin people can see few all the features where as normal users can have access to limited menu items...how can i achieve this. Please note that my menu is not a database driven menu.
Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fit" instead of the number and for the multiples of five print "Bit". For numbers which are multiples of both three and five print "FitBit".
why should i hire u
what is dot net framework
My Qualification is MCA.My interview is on 5th may.They may ask q as------AS u r MCA...Why u r not tring anywhere else? What can be the ans?
1 Answers State Bank Of India SBI,