public StudentMasterDetailsViewModel()
 {
     _studentCollection            = new StudentCollection();
     _studentMasterViewModel       = new StudentMasterViewModel();
     _deleteCommand                = new RelayCommand(DoDelete, CanDelete); // Changed
     _studentItemViewModelSelected = null;
 }
예제 #2
0
 public StudentMasterDetailsViewModel()
 {
     _studentCollection            = new StudentCollection();
     _studentMasterViewModel       = new StudentMasterViewModel();
     _deleteCommand                = null; // This needs to be changed
     _studentItemViewModelSelected = null;
 }
예제 #3
0
        public List <StudentItemViewModel> GetStudentItemViewModelCollection(StudentCollection collection)
        {
            List <StudentItemViewModel> items = new List <StudentItemViewModel>();

            foreach (Student s in collection.Students)
            {
                items.Add(new StudentItemViewModel(s));
            }

            return(items);
        }