private void DeleteZoo_Clicked(object sender, RoutedEventArgs e) { if (listBoxZoo.SelectedItem != null) { try { DbConnectionManager.DeleteZoo(listBoxZoo); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } finally { ShowZooList(); textZoo.Text = ""; } } else { MessageBox.Show("Please select a zoo to delete"); } }