public ClassesController(Model model, View view) { this.model = (ClassesInSchoolsModel) model; this.view = (ClassesView) view; classesModel = (ClassesModel) ModelFactory.NewModelInstance(ModelType.Classes); usersModel = (UsersModel) ModelFactory.NewModelInstance(ModelType.Users); classesList = new List<ClassObject>(); schoolClassesList = new List<ClassInSchoolObject>(); teachersList = new List<UserObject>(); this.view.CurrentListView.SelectionMode = System.Windows.Controls.SelectionMode.Single; this.view.buttonAdd.Click += ActionShowDialog; this.view.buttonDelete.Click += ActionDelete; this.view.buttonDelete.IsEnabled = false; LoadClassNames(); LoadData(); }
public UsersController(Model model, View view) { this.model = (UsersModel) model; this.view = (UsersView) view; classesList = new List<ClassObject>(); schoolClassesList = new List<ClassInSchoolObject>(); usersList = new List<object>(); classesModel = (ClassesModel) ModelFactory.NewModelInstance(ModelType.Classes); schoolClassesModel = (ClassesInSchoolsModel) ModelFactory.NewModelInstance(ModelType.ClassesInSchools); this.view.buttonDelete.Click += ActionDelete; this.view.buttonAdd.Click += ActionShowDialog; schoolClassesModel = (ClassesInSchoolsModel) ModelFactory.NewModelInstance(ModelType.ClassesInSchools); LoadClasses(); GetData(); }
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(); }