Esempio n. 1
0
        internal bool EnrolClass(Class enrolClass, Student student, ClassController classController)
        {
            string key = student.Id;

            studentList[key].AddClass(enrolClass);
            if (classController.AddStudent(student, enrolClass))
            {
                return(true);
            }
            return(false);
        }
Esempio n. 2
0
 public TestHarness()
 {
     cc   = new CourseController();
     lc   = new LecturerController();
     rc   = new RoomController();
     clc  = new ClassController();
     sc   = new StudentController();
     cmv  = new CourseManagementView(cc);
     lmv  = new LecturerManagementView(lc);
     rmv  = new RoomManagementView(rc);
     clmv = new ClassManagementView(clc, cc, lc, rc);
     smv  = new StudentManagementView(sc, cc, clc, lc, rc);
 }
Esempio n. 3
0
        internal bool CheckClashTime(Class enrolClass, Student student, ClassController classController)
        {
            List <Class> enrolledClassList = classController.GetEnrolledClasses(student);
            bool         conflicted        = false;

            if (enrolledClassList.Count != 0)
            {
                // Check each class period in class have enrolled by student against that of will enrol class
                foreach (Class sClass in enrolledClassList)
                {
                    //List<ClassPeriod> sCP = sClass.ClassPeriodList;
                    foreach (ClassPeriod eCP in enrolClass.ClassPeriodList)
                    {
                        foreach (ClassPeriod sCP in sClass.ClassPeriodList)
                        {
                            //if(sCP.Room.RoomNo.Equals(eCP.Room.RoomNo))
                            //{
                            if (sCP.TimeConflict(eCP))
                            {
                                conflicted = true;
                            }
                            break;
                            //}
                        }
                        if (conflicted)
                        {
                            break;
                        }
                    }
                    if (conflicted)
                    {
                        break;
                    }
                }
            }
            return(conflicted);
        }
Esempio n. 4
0
 public ReportController(CourseController courseController, ClassController classController)
 {
     // TODO: Complete member initialization
     this.courseController = courseController;
     this.classController  = classController;
 }