public int GetEmployeeAttendanceId() { int employattndnceid = 0; objEmpDAL = new Employee_DAL(objEmpProp); foreach (DataRow dr in objEmpDAL.SelectOne().Rows) { employattndnceid = Convert.ToInt32(dr["Attendance_Id"].ToString()); } return(employattndnceid); }
public bool CheckEmployeeID() { objEmpDAL = new Employee_DAL(objEmpProp); DataTable dt = objEmpDAL.CheckEmployeeID(); if (dt.Rows.Count > 0) { return(true); } else { return(false); } }
public void Fill() { DataTable dataTable = Employee_DAL.GetDataTable(); Employee employee = new Employee(); DataRow dataRow; for (int i = 0; i < dataTable.Rows.Count; i++) { dataRow = dataTable.Rows[i]; employee = new Employee(dataRow); this.Add(employee); } }
//Get Autogenerated ID public static int GetAutogeneratedEmployeeID_BL() { int Empid = 0; try { Empid = Employee_DAL.GetAutoGeneratedEmployeeId(); } catch (SqlException ex) { throw ex; } catch (HRMSException ex) { throw ex; } return(Empid); }
//Load All Seciality public static DataTable LoadSeciality_BL() { DataTable Spec = null; try { Spec = Employee_DAL.LoadSpeciality(); } catch (SqlException ex) { throw ex; } catch (HRMSException ex) { throw ex; } return(Spec); }
//Load All Level public static DataTable LoadLevel_BL() { DataTable level = null; try { level = Employee_DAL.LoadLevels(); } catch (SqlException ex) { throw ex; } catch (HRMSException ex) { throw ex; } return(level); }
//Load All Skill public static DataTable LoadSkill_BL() { DataTable skill = null; try { skill = Employee_DAL.LoadSkills(); } catch (SqlException ex) { throw ex; } catch (HRMSException ex) { throw ex; } return(skill); }
//Load All Project public static DataTable LoadProject_BL() { DataTable Project = null; try { Project = Employee_DAL.LoadProjectNames(); } catch (SqlException ex) { throw ex; } catch (HRMSException ex) { throw ex; } return(Project); }
public static DataTable LoadCivilStatus_BL() { DataTable CVS = null; try { CVS = Employee_DAL.LoadCivilStatus(); } catch (SqlException ex) { throw ex; } catch (HRMSException ex) { throw ex; } return(CVS); }
//Dispaly All EMployee public static DataTable DisplayEmployee_BL() { DataTable Emp = null; try { Emp = Employee_DAL.DisplayAllEmployees(); } catch (SqlException ex) { throw ex; } catch (HRMSException ex) { throw ex; } return(Emp); }
//Search Employee By Id public static DataTable SearchEmployeeById_BL(int id) { DataTable Emp = null; try { Emp = Employee_DAL.SearchEmployeeById(id); } catch (SqlException ex) { throw ex; } catch (HRMSException ex) { throw ex; } return(Emp); }
//Delete Employee public static int DeleteEmployee_BL(int id) { int rowsAffected = 0; try { rowsAffected = Employee_DAL.DeleteEmployee(id); } catch (SqlException ex) { throw ex; } catch (HRMSException ex) { throw ex; } return(rowsAffected); }
public void FillNew() { DataTable dataTable = Employee_DAL.GetDataTable(); Employee employee = new Employee(); DataRow dataRow; double Bonus; for (int i = 0; i < dataTable.Rows.Count; i++) { dataRow = dataTable.Rows[i]; employee = new Employee(dataRow); Bonus = GetBonus(DateTime.Now.Date, employee); employee.Salary += Convert.ToInt32(Bonus); this.Add(employee); } }
//Calling Update Employee public static int UpdateEmployee_BL(Employee newEmp, CapgeminiDetails capg) { int rowsAffected = 0; try { if (ValidatEmployee(newEmp)) { rowsAffected = Employee_DAL.UpdateEmployee(newEmp, capg); } } catch (SqlException ex) { throw ex; } catch (HRMSException ex) { throw ex; } return(rowsAffected); }
public bool UpdateStatusAndAddClockOut(Employee_DAL emp) { return(empAccess.UpdateStatusAndAddClockOut(emp)); }
public bool Insert() { objEmpDAL = new Employee_DAL(objEmpProp); return(objEmpDAL.Insert()); }
public bool UpdateStatus() { objEmpDAL = new Employee_DAL(objEmpProp); return(objEmpDAL.UpdateStatus()); }
public DataTable SelectDepandant() { objEmpDAL = new Employee_DAL(objdepandant); return(objEmpDAL.SelecDepandanttOne()); }
public DataTable SelectOne() { objEmpDAL = new Employee_DAL(objEmpProp); return(objEmpDAL.SelectOne()); }
public DataTable SelectAll() { objEmpDAL = new Employee_DAL(); return(objEmpDAL.SelectAll()); }