private void btnRemoveTest_Click(object sender, RoutedEventArgs e) { try { bl.deleteTest(MyTest); MessageBox.Show("you have successfully removed a test"); } catch (Exception ex) { MessageBox.Show(ex.Message); } }