public string generateEmployeeid()*//here i am getting this error 'objdataclassname.generateEmployeeid()'.' not all code paths return a value'*
{
objDataBaseClass = new DataBaseClass();
if (Designation == "Student")
{
int id;
int count = 01;
string typ = "SID-";
objDataBaseClass = new DataBaseClass();
Table = objDataBaseClass.GetDataTable("spGetEmployeeID");// passing storerprocedure name
if (Table.Rows.Count > 0)
{
DataRow Row = Table.Rows[0];
id = int.Parse(Row[0].ToString());
returnString = typ + (count + id).ToString();
}
return returnString;
} } // i need to generate Userid for different users
raajsj 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.