Hi
I want to generate sequence number in C# window application I have got one link on Google, but I it is not helpful. I want that on click to add button an order sequence number should generate and stored in SQL Database
i have written this code but it is not helpful
{
String file2 = "ordernumber.txt";
FileInfo firead = new FileInfo (file2);
String Input = String.Empty;
int Num =1;
if(firead.Exists)
{
Input=File.ReadAllText(file2);
}
if(Input!=String.Empty)
{
Num=Convert.ToInt32(Input);
}
File.WriteAllText(file2,(Num+1).ToString());
return;
}
Please help me to generate sequence number in C# and stored in SQL Database