private void DeleteButton_Click(object sender, RoutedEventArgs e) { if (MessageBox.Show("Are you sure you want to delete this tester?", "Delete", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes) { if (myBL.Delete_tester(IDTextBox.Text)) { MessageBox.Show("The tester was deleted", "Confirmation", MessageBoxButton.OK, MessageBoxImage.Information); } MainWindow.myWindow.Close(); } }