private void GetReport(int CreatedBy) { try { DataSet objDs = _objBALUser.GetUserLoginDetailsByLoginId(CreatedBy); if (objDs.Tables[0].Rows.Count > 0) { string staffNo = objDs.Tables[0].Rows[0]["staffno"].ToString(); DataSet objDsrpt = _objBORpeort.UkznApprovalReports(staffNo); if (objDsrpt.Tables[0].Rows.Count > 0) { gvApprovalReports.DataSource = objDsrpt; gvApprovalReports.DataBind(); } else { gvApprovalReports.DataSource = null; gvApprovalReports.DataBind(); } } } catch (Exception ex) { lblMsg.Text = _objBOUtiltiy.ShowMessage("danger", "Error ", ex.Message); } }