Exemple #1
0
        public void GetDataSource()
        {
            HREmployeesController objEmployeesController = new HREmployeesController();
            int    branchID                  = Convert.ToInt32(fld_lkeFK_BRBranchID.EditValue);
            int    departmentID              = Convert.ToInt32(fld_lkeFK_HRDepartmentID.EditValue);
            int    departmentRoomID          = Convert.ToInt32(fld_lkeFK_HRDepartmentRoomID.EditValue);
            int    departmentRoomGroupItemID = Convert.ToInt32(fld_lkeFK_HRDepartmentRoomGroupItemID.EditValue);
            int    employeePayrollFormulaID  = Convert.ToInt32(fld_lkeFK_HREmployeePayrollFormulaID.EditValue);
            string status = string.Empty;
            List <HREmployeesInfo> employeesList = EmployeesList.Where(o1 => (o1.FK_BRBranchID == branchID || branchID == 0) &&
                                                                       (o1.FK_HRDepartmentID == departmentID || departmentID == 0) &&
                                                                       (o1.FK_HRDepartmentRoomID == departmentRoomID || departmentRoomID == 0) &&
                                                                       (o1.FK_HRDepartmentRoomGroupItemID == departmentRoomGroupItemID || departmentRoomGroupItemID == 0) &&
                                                                       (o1.FK_HREmployeePayrollFormulaID == employeePayrollFormulaID || employeePayrollFormulaID == 0) &&
                                                                       (o1.HREmployeeStatusCombo == status || string.IsNullOrEmpty(status)))
                                                   .ToList();

            employeesList.ForEach(o1 =>
            {
                o1.HREmployeeOTDate     = EmployeeOTDate;
                o1.HREmployeeOTDateEnd  = EmployeeOTDateEnd;
                o1.HREmployeeOTFromDate = EmployeeOTFromDate;
                o1.HREmployeeOTToDate   = EmployeeOTToDate;
            });

            fld_dgcHREmployees.DataSource = employeesList;
        }