コード例 #1
0
 private void DeleteButton_Click(object sender, RoutedEventArgs e)
 {
     if (MessageBox.Show("Do you realy want to delete?", "Question", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.No)
     {
         return;
     }
     else
     {
         foreach (Student s in StudentsDataGrid.SelectedItems)
         {
             EntityDb.DeleteStudent(s);
         }
         GetStudents();
     }
 }