I have a query which returns a DataSet. After that I check whether records are available or not. If no records available I want to display error message, exit from the process and redirect to another page. Methods available in below the exiting method should not execute.
Here is the code I have so far.
ds = dba.loadEmpInfo(number, searchType, department);
string appNumber = "";
if (ds.Tables[0].Rows.Count > 0)
{
appNumber = ds.Tables[0].Rows[0]["Ref_no"].ToString();
workDS = dba.workExp(appNumber, searchType);
}
else
{
WebMsgBox.Show("No Record relevant to this app number are available");
}