public DataSet GetEmpDetailsFromEmpID(string EmpID) { objData = new ClsData(); DataSet dsAIPLData = new DataSet("AIPLData"); try { if ((dtResult.Columns.Count == 0)) { dtResult.Columns.Add("Result"); dtResult.Columns.Add("Code"); dtResult.Columns.Add("Description"); dtResult.Rows.Add(); } dsAIPLData = objData.GetEmpDetailsFromEmpID(EmpID); if (dsAIPLData != null) { dtResult.Rows[0]["Result"] = "A"; dtResult.Rows[0]["Code"] = "000"; dtResult.Rows[0]["Description"] = "Success"; dtResult.AcceptChanges(); dsAIPLData.Tables.Add(dtResult.Copy()); dsAIPLData.Tables[0].TableName = "EmpDetails"; } else { dtResult.Rows[0]["Result"] = "R"; dtResult.Rows[0]["Code"] = "001"; dtResult.Rows[0]["Description"] = "No Data Found"; dtResult.AcceptChanges(); dsAIPLData = new DataSet(); dsAIPLData.Tables.Add(dtResult.Copy()); } return(dsAIPLData); } catch (Exception ex) { SendEMail(ErrorMailSendTo, "GetEmpDetailsFromEmpID", ex.Message.ToString()); return(null); } }