예제 #1
0
        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();
        }
예제 #2
0
        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();
        }