Пример #1
0
 void Student_DeleteStudentEvent(StudentViewModel StudentViewModel)
 {
     DisconnectStudentViewModel(StudentViewModel);
     TheStudents.Remove(StudentViewModel);
 }
Пример #2
0
        public void AddStudentAction()
        {
            StudentViewModel newStudentVM = new StudentViewModel { FirstName = null, LastName = null };

            ConnectStudentViewModel(newStudentVM);

            TheStudents.Add(newStudentVM);
        }
Пример #3
0
 void DisconnectStudentViewModel(StudentViewModel StudentViewModel)
 {
     StudentViewModel.DeleteStudentEvent -= Student_DeleteStudentEvent;
 }
Пример #4
0
 void ConnectStudentViewModel(StudentViewModel StudentViewModel)
 {
     StudentViewModel.DeleteStudentEvent += Student_DeleteStudentEvent;
 }
 void DisconnectStudentViewModel(StudentViewModel StudentViewModel)
 {
     StudentViewModel.DeleteStudentEvent -= Student_DeleteStudentEvent;
 }
 void ConnectStudentViewModel(StudentViewModel StudentViewModel)
 {
     StudentViewModel.DeleteStudentEvent += Student_DeleteStudentEvent;
 }
 void Student_DeleteStudentEvent(StudentViewModel StudentViewModel)
 {
     DisconnectStudentViewModel(StudentViewModel);
     TheStudents.Remove(StudentViewModel);
 }