private void DgManageStudents_MouseDoubleClick(object sender, MouseButtonEventArgs e) { // selecting a student as a manager with a double click var iep = (Students)dgManageStudents.SelectedItem; var details = new IEPDetailsManage(iep); var result = details.ShowDialog(); if (result == true) { // refreshs the view of the students once one has been deleted _currentStudents = null; _students = _studentManager.GetStudents(); if (_currentStudents == null) { _currentStudents = _students; } dgManageStudents.ItemsSource = _currentStudents; } else { MessageBox.Show(result.ToString()); } }
private void BtnManageSelect_Click(object sender, RoutedEventArgs e) { // selecting a student as a manager with the select button var iep = (Students)dgManageStudents.SelectedItem; var details = new IEPDetailsManage(iep); var result = details.ShowDialog(); MessageBox.Show(result.ToString()); }