private void UpdateZoo_Clicked(object sender, RoutedEventArgs e) { ZooModel zooModel = new ZooModel(); zooModel.Location = textZoo.Text; try { DbConnectionManager.UpdateZoo(listBoxZoo, zooModel); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } finally { if (listBoxZoo.SelectedItem != null) { ShowZooList(); textZoo.Text = ""; } } }