COMMUNITY: How to properly ask a question on Forums
Become a member
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
C# Corner Home
Technologies
Monthly Leaders
ASK A QUESTION
Forum guidelines
Jyoti Jodha
618
1.6k
34.8k
How to delete bill number auto Increment in windows APP. C#
Jan 8 2018 2:10 AM
How to delete bill number auto Increment
Suppose I Have 50 Bill Total and I delete bill number 10 to 25. Now when creating new bill number
Bill Number 10 and then complete 25 bills
After create new bill 51 number
int Billno = billno("Select ISNULL(Max(Billno+1),1) From BillForm
private int billno(string p)
{
Int32 Billno = 0;
//s = Billno;
cmd = new SqlCommand(p, con);
int k;
con.Open();
if (txtbill.Text != "")
{
Billno = Convert.ToInt32(txtbill.Text);
k = Billno;
s = k;
k = (Int32)cmd.ExecuteScalar();
con.Close();
return Billno;
}
else
{
Billno = s;
Billno = (Int32)cmd.ExecuteScalar();
con.Close();
return Billno;
}
}
Reply
Answers (
2
)
How to get device id for desktop Application
Identity Remote Desktop Connection
"