コード例 #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 = Convert.ToString(fld_lkeHREmployeeStatusCombo.EditValue);
            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;
        }
コード例 #2
0
        protected void InvalidateEmployee()
        {
            VinaDbUtil            dbUtil                 = new VinaDbUtil();
            int                   employeeID             = dbUtil.GetPropertyIntValue(CurrentModuleEntity.MainObject, "FK_HREmployeeID");
            HREmployeesController objEmployeesController = new HREmployeesController();
            HREmployeesInfo       objHREmployeesInfo     = (HREmployeesInfo)objEmployeesController.GetObjectByID(employeeID);

            if (objHREmployeesInfo != null)
            {
                dbUtil.SetPropertyValue(CurrentModuleEntity.MainObject, String.Format("{0}EmployeePicture", MainTablePrefix), objHREmployeesInfo.HREmployeePicture);
                CurrentModuleEntity.UpdateMainObjectBindingSource();
            }
        }