I want to Generate Code from SQL server to C# application !
like if i type code 5 in my sql table than start numbers in C# application with 00001
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Joginder BangerPosted Dec 17, 2014, 7:23 AM
int sqlnumber=3;
//create a function...
public int retunrNumber(int number)
{
string tempnumber="";
for(int i=1;i<=number;i++)
{
if(i!=number)
{
tempnumber+="0";
}
else
{
tempnumber+="1";
}
}
return convert.Int32(tempnumber);
}