Beispiel #1
0
        public void ChangeDepartmentRoomBoundary()
        {
            DepartmentEntities entity     = (DepartmentEntities)CurrentModuleEntity;
            HRDepartmentsInfo  mainObject = (HRDepartmentsInfo)entity.MainObject;

            mainObject.HRDepartmentBoundary      = (decimal)entity.DepartmentRoomsList.Sum(o => o.HRDepartmentRoomBoundary);
            mainObject.HRDepartmentMenBoundary   = (decimal)entity.DepartmentRoomsList.Sum(o => o.HRDepartmentRoomMenBoundary);
            mainObject.HRDepartmentWoMenBoundary = (decimal)entity.DepartmentRoomsList.Sum(o => o.HRDepartmentRoomWoMenBoundary);
            entity.UpdateMainObjectBindingSource();
        }
Beispiel #2
0
        public override void Invalidate(int iObjectID)
        {
            base.Invalidate(iObjectID);
            ArrangementShiftEntities    entity = (ArrangementShiftEntities)CurrentModuleEntity;
            HRDepartmentsController     objDepartmentsController     = new HRDepartmentsController();
            HRDepartmentRoomsController objDepartmentRoomsController = new HRDepartmentRoomsController();
            HREmployeesController       objEmployeesController       = new HREmployeesController();

            foreach (var objEmployeeArrangementShiftsInfo in entity.EmployeeArrangementShiftsList)
            {
                HREmployeesInfo   objEmployeesInfo   = (HREmployeesInfo)objEmployeesController.GetObjectByID(objEmployeeArrangementShiftsInfo.FK_HREmployeeID);
                HRDepartmentsInfo objDepartmentsInfo = (HRDepartmentsInfo)objDepartmentsController.GetObjectByID(objEmployeesInfo.FK_HRDepartmentID);
                if (objDepartmentsInfo != null)
                {
                    objEmployeeArrangementShiftsInfo.HRDepartmentName = objDepartmentsInfo.HRDepartmentName;
                }
                HRDepartmentRoomsInfo objDepartmentRoomsInfo = (HRDepartmentRoomsInfo)objDepartmentRoomsController.GetObjectByID(objEmployeesInfo.FK_HRDepartmentRoomID);
                if (objDepartmentRoomsInfo != null)
                {
                    objEmployeeArrangementShiftsInfo.HRDepartmentRoomName = objDepartmentRoomsInfo.HRDepartmentRoomName;
                }
            }
            InitializeArrangementShiftEntryGridControl();
        }
Beispiel #3
0
 public override void InitMainObject()
 {
     MainObject   = new HRDepartmentsInfo();
     SearchObject = new HRDepartmentsInfo();
 }