Esempio n. 1
0
 public StudentMasterDetailsViewModel()
 {
     _studentCatalog = new StudentCatalog();
     _factory        = new StudentViewModelFactory();
     _studentItemViewModelSelected = null;
     _deleteCommand = new DeleteCommand(_studentCatalog, this);
 }
Esempio n. 2
0
 public StudentMasterDetailsViewModel()
 {
     _studentModel                 = new StudentModel();
     _studentMasterViewModel       = new StudentMasterViewModel();
     _deleteCommand                = new RelayCommand(DoDelete, CanDelete);
     _studentItemViewModelSelected = null;
 }
Esempio n. 3
0
        public void Delete(string name)
        {
            // Delete from model model
            _studentModel.Delete(name);

            // Set selection to null
            StudentItemViewModelSelected = null;

            // Refresh the item list
            OnPropertyChanged(nameof(StudentItemViewModelCollection));
        }