public void SearchEmployeeGroupList() { try { EmployeeGroupListUI employeeGroupListUI = new EmployeeGroupListUI(); employeeGroupListUI.Search = txtCountrySearch.Text; DataTable dtb = employeeGroupListBAL.GetEmployeeGroupListBySearchParameters(employeeGroupListUI); if (dtb.Rows.Count > 0 && dtb != null) { gvEmployeeGroupSearch.DataSource = dtb; gvEmployeeGroupSearch.DataBind(); divEmployeeGroupSearchError.Visible = false; } else { divEmployeeGroupSearchError.Visible = true; lblEmployeeGroupSearchError.Text = Resources.GlobalResource.msgNoRecordFound; gvEmployeeGroupSearch.Visible = false; } } catch (Exception exp) { logExcpUIobj.MethodName = "EmployeeGroup()"; logExcpUIobj.ResourceName = "Finance_Accounts_Payable_Employee_Supplier_Master_Creation_EmployeeForm.CS"; logExcpUIobj.RecordId = "All"; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[Finance_Accounts_Payable_Employee_Supplier_Master_Creation_EmployeeForm : EmployeeGroup] An error occured in the processing of Record. Details : [" + exp.ToString() + "]"); } }
public int DeleteEmployeeGroup(EmployeeGroupListUI employeeGroupListUI) { int result = 0; result = employeeGroupListDAL.DeleteEmployeeGroup(employeeGroupListUI); return(result); }
public DataTable GetEmployeeGroupListBySearchParameters(EmployeeGroupListUI employeeGroupListUI) { DataTable dtb = new DataTable(); dtb = employeeGroupListDAL.GetEmployeeGroupListBySearchParameters(employeeGroupListUI); return(dtb); }
public DataTable GetEmployeeGroupListById(EmployeeGroupListUI employeeGroupListUI) { DataTable dtb = new DataTable(); dtb = employeeGroupListDAL.GetEmployeeGroupListById(employeeGroupListUI); return(dtb); }
private void BindListBySearchParameters(EmployeeGroupListUI employeeGroupListUI) { try { DataTable dtb = employeeGroupListBAL.GetEmployeeGroupListBySearchParameters(this.employeeGroupListUI); if (dtb.Rows.Count > 0 && dtb != null) { gvData.DataSource = dtb; gvData.DataBind(); divError.Visible = false; gvData.Visible = true; } else { divError.Visible = true; lblError.Text = Resources.GlobalResource.msgNoRecordFound; gvData.Visible = false; } txtSearch.Text = ""; txtSearch.Focus(); } catch (Exception exp) { logExcpUIobj.MethodName = "BindListBySearchParameters()"; logExcpUIobj.ResourceName = "Finance_Accounts_Payable_Employee_Supplier_Master_Creation_EmployeeGroupList.CS"; logExcpUIobj.RecordId = "All"; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[Finance_Accounts_Payable_Employee_Supplier_Master_Creation_EmployeeGroupList: BindListBySearchParameters] An error occured in the processing of Record. Details : [" + exp.ToString() + "]"); } }
public DataTable GetEmployeeGroupListById(EmployeeGroupListUI employeeGroupListUI) { DataSet ds = new DataSet(); DataTable dtbl = new DataTable(); //Boolean result = false; try { using (SqlConnection SupportCon = new SqlConnection(connectionString)) { SqlCommand sqlCmd = new SqlCommand("SP_EmployeeGroup_SelectById", SupportCon); sqlCmd.CommandType = CommandType.StoredProcedure; sqlCmd.CommandTimeout = commandTimeout; sqlCmd.Parameters.Add("@tbl_EmployeeGroupId", SqlDbType.NVarChar); sqlCmd.Parameters["@tbl_EmployeeGroupId"].Value = employeeGroupListUI.Tbl_EmployeeGroupId; using (SqlDataAdapter adapter = new SqlDataAdapter(sqlCmd)) { adapter.Fill(ds); } } if (ds.Tables.Count > 0) { dtbl = ds.Tables[0]; } } catch (Exception exp) { logExcpUIobj.MethodName = "getEmployeeGroupListById()"; logExcpUIobj.ResourceName = "EmployeeGroupListDAL.CS"; logExcpUIobj.RecordId = employeeGroupListUI.Tbl_EmployeeGroupId; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[EmployeeGroupListDAL : getEmployeeGroupListById] An error occured in the processing of Record Id : " + employeeGroupListUI.Tbl_EmployeeGroupId + ". Details : [" + exp.ToString() + "]"); } finally { ds.Dispose(); } return(dtbl); }
public int DeleteEmployeeGroup(EmployeeGroupListUI employeeGroupListUI) { int result = 0; try { using (SqlConnection SupportCon = new SqlConnection(connectionString)) { SupportCon.Open(); SqlCommand sqlCmd = new SqlCommand("SP_EmployeeGroup_Delete", SupportCon); sqlCmd.CommandType = CommandType.StoredProcedure; sqlCmd.CommandTimeout = commandTimeout; sqlCmd.Parameters.Add("@tbl_EmployeeGroupId", SqlDbType.NVarChar); sqlCmd.Parameters["@tbl_EmployeeGroupId"].Value = employeeGroupListUI.Tbl_EmployeeGroupId; result = sqlCmd.ExecuteNonQuery(); sqlCmd.Dispose(); SupportCon.Close(); } } catch (Exception exp) { logExcpUIobj.MethodName = "DeleteEmployeeGroup()"; logExcpUIobj.ResourceName = "EmployeeGroupListDAL.CS"; logExcpUIobj.RecordId = employeeGroupListUI.Tbl_EmployeeGroupId; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[EmployeeGroupListDAL : DeleteEmployeeGroup] An error occured in the processing of Record Id : " + employeeGroupListUI.Tbl_EmployeeGroupId + ". Details : [" + exp.ToString() + "]"); } return(result); }