private void AddCityButton_Click(object sender, RoutedEventArgs e) { AddCity addCityWin = new AddCity(); addCityWin.Closed += addCityWin_Closed; addCityWin.ShowDialog(); }
private void EditCityButton_Click(object sender, RoutedEventArgs e) { if (CityDataGrid.SelectedItems.Count != 1) { MessageBox.Show("Select 1 city to edit"); return; } AddCity addCityWin = new AddCity(((City)CityDataGrid.SelectedItem).CITY_CODE); addCityWin.Closed += addCityWin_Closed; addCityWin.ShowDialog(); }