Example #1
0
        public GradesController(Model model, View view)
        {
            this.model = (GradesModel) model;
            this.view = (GradesView) view;

            coursesModel = (CoursesModel) ModelFactory.NewModelInstance(ModelType.Courses);
            courseRubricsModel = (CourseRubricsModel) ModelFactory.NewModelInstance(ModelType.CourseRubrics);

            coursesList = new List<CourseObject>();
            rubricsList = new List<CourseRubricObject>();
            gradesListDictionary = new Dictionary<string, List<GradeObject>>();

            this.view.comboBoxCourse.SelectionChanged += ActionComboChange;

            FetchAllData();
        }
        public StudentGradingController(Model model, View view)
        {
            this.model = (GradesModel) model;
            this.view = (StudentGradingView) view;

            coursesModel = (CoursesModel) ModelFactory.NewModelInstance(ModelType.Courses);
            courseRubricsModel = (CourseRubricsModel) ModelFactory.NewModelInstance(ModelType.CourseRubrics);
            usersModel = (UsersModel) ModelFactory.NewModelInstance(ModelType.Users);

            coursesList = new List<CourseObject>();
            rubricsList = new List<CourseRubricObject>();
            studentsList = new List<UserObject>();

            gradesListDictionary = new Dictionary<string, List<GradeObject>>();

            this.view.comboBoxCourse.SelectionChanged += ActionComboChange;
            this.view.comboBoxStudent.SelectionChanged += ActionComboChange;
            this.view.buttonAddGrade.Click += ActionShowDialog;

            FetchAllData();
        }