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


VulpesRank #55 · 29.2K reputationPosted Jan 25, 2014, 8:34 AM EST
asela nuwan15 reputationPosted Jan 25, 2014, 8:46 PM EST
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
VulpesRank #55 · 29.2K reputationPosted Jan 26, 2014, 6:32 AM EST
Just write them in SQL Server as you normally would and then call them from C# code.
SUNIL GUTTARank #1,832 · 810 reputationPosted Jan 26, 2014, 8:00 AM EST
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