예제 #1
0
            public static List <Staff> getInvigilatorsList()
            {
                MaintainStaffControl maintainStaffControl = new MaintainStaffControl();
                List <Staff>         invigilatorsList     = maintainStaffControl.searchLecturer("Invigilator", "categoryOfInvigilator");

                maintainStaffControl.shutDown();
                return(invigilatorsList);
            }
예제 #2
0
            //new part

            public void Assign(List <Examination>[] ExaminationList, List <Staff>[] StaffList)
            {
                //clear invigilationDuty table
                MaintainInvigilationDutyControl maintainInvDutyControl = new MaintainInvigilationDutyControl();

                maintainInvDutyControl.clearInvigilationDuty();
                maintainInvDutyControl.shutDown();

                MaintainTimetableControl maintainTimetableControl = new MaintainTimetableControl();
                List <Timetable>         examTimetable            = maintainTimetableControl.selectTimetable();

                maintainTimetableControl.shutDown();

                //This part will be unchanged (CS)
                MaintainStaffControl maintainStaffControl     = new MaintainStaffControl();
                double totalLoadOfDutyForEachInvigilator      = calculateTotalLoadOfDutyForEachInvigilator(calculateTotalInvigilatorsRequired(examTimetable), maintainStaffControl.countTotalInvigilatorsAvailable());
                double totalLoadOfDutyForEachChiefInvigilator = calculateTotalLoadOfDutyForEachChiefInvigilator(calculateTotalChiefInvigilatorsRequired(examTimetable), maintainStaffControl.countTotalChiefInvigilatorsAvailable());

                maintainStaffControl.shutDown();

                //This part will be unchanged (CS)
                double minTotalLoadOfDutyForEachInvigilator      = (int)totalLoadOfDutyForEachInvigilator;
                double minTotalLoadOfDutyForEachChiefInvigilator = (int)totalLoadOfDutyForEachChiefInvigilator;
            }