private void button_Click(object sender, RoutedEventArgs e) { try { bl.deleteNanny(int.Parse(textBox.Text)); } catch (Exception Ex) { MessageBox.Show(Ex.Message); } }