Exemple #1
0
        private void CreateStudent()
        {
            Student             student = new Student();
            StudentEditorWindow target  = new StudentEditorWindow(student)
            {
                Owner = this.SourceWindow
            };

            SwitchWindows(target, true);
            this.StudentList = ReloadStudentList();
        }
Exemple #2
0
        private void EditStudent(object param)
        {
            StudentEditorWindow target = new StudentEditorWindow((Student)((DataGrid)param).SelectedItem)
            {
                Owner = this.SourceWindow
            };

            SwitchWindows(target, true);
            this.StudentList    = ReloadStudentList();
            this.TeamList       = ReloadActiveTeamList();
            this.TeamFilterList = ReloadTeamFilterList();
        }
Exemple #3
0
 public StudentEditorWindowViewModel(StudentEditorWindow teacherEditorWindow, Student student)
 {
     this.SourceWindow    = teacherEditorWindow;
     this._contextDal     = new StudentDAL();
     this.UsersDal        = new UsersDAL();
     this.SelectedStudent = student;
     this.SaveCommand     = new RelayCommand(SaveStudent, CanExecute);
     this.TeamList        = new ObservableCollection <Team>(((StudentDAL)_contextDal).TeamList());
     if (SelectedStudent.Users == null)
     {
         SelectedStudent.Users = new Users();
     }
 }