User Registration based on country

Posted by Murugavelmsc under ASP.NET on 2/11/2013 | Points: 10 | Views : 1135 | Status : [Member] | Replies : 1
Hi,

I need to develop a application. In this user registration form, user select country "india" means it saves the empid as start with 0000
other than india means start with "5000"

Table:

Empid (PK)
Empname
Country
password

Please help me.

Thanks,
Murugavel S

Regards,
Murugavel S
murugavel.sadagopan@gmail.com
http://murugavelmsc.blogspot.in/



Responses

Posted by: Saranpselvam on: 2/11/2013 [Member] Starter | Points: 25

Up
0
Down

it is very simple
you can use simple if loop
string countryocdePrefix = string.Empty;
string countryName = string.Empty;
string empid,empname,country,password = string.Empty;// get max count of emp record from employee table


if (countryName == "india")
{
countryocdePrefix = "0000";
}
else
{
countryocdePrefix = "5000";
}

bool isInsert = insertUserDetail(countryocdePrefix + empid, empname, country, password);


Murugavelmsc, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response