private void updateNanny_Click(object sender, RoutedEventArgs e) { try { bl.updateNanny(nanny); this.Close(); } catch (Exception r) { MessageBox.Show(r.Message); } }