I just need to implement employee registration form, it include auto generation of employee number that will begins from 0001. right after the filling all the fields in the form record data in to data base and clear all the data withing form and increment the emp number by one 0002
how could i do this ?
Loading

SUNIL GUTTAPosted Jan 26, 2014, 1:00 PM
command cmd=new command();
cmd.commandtext="select isNull(Max(eno),0001)+1 from employee";
txteno.text= cmd.executescalar();
Like this you can generate eno's automatically using simple sql statement using ado command classes .
Any issues revert back . Happy to help
VulpesPosted Jan 26, 2014, 11:32 AM
Just write them in SQL Server as you normally would and then call them from C# code.
asela nuwanPosted Jan 26, 2014, 1:46 AM
http://www.dotnetfunda.com/articles/show/2264/generating-custom-auto-numbers-and-using-it-in-application
this is what i want, but i'm confusing about "stored procedure" how can i create that in my current C# project
VulpesPosted Jan 25, 2014, 1:34 PM