public StudentEditPresenter(StudentEditView studentEditView, StudentBll studentBll)
        {
            this._studentEditView = studentEditView;
            _studentBll           = studentBll;

            UpdateForm();
        }
Esempio n. 2
0
        public static bool StudentEdit(Student student)
        {
            var viewModel = new StudentEditWindowModel(student);
            var view      = new StudentEditView
            {
                DataContext = viewModel
            };

            if (view.ShowDialog() != true)
            {
                return(false);
            }

            student.Name       = viewModel.Name;
            student.Surname    = viewModel.Surname;
            student.Patronymic = viewModel.Patronymic;
            student.Birthday   = viewModel.Birthday;
            student.Group      = viewModel.Group;

            App.Db.SaveChanges();

            return(true);
        }