private void добавитьToolStripMenuItem_Click(object sender, EventArgs e) { AddCityForm addCityForm = new AddCityForm(dB.Add(), CountryDB); addCityForm.ShowDialog(); dB.Save(); }
private void редактироватьToolStripMenuItem_Click(object sender, EventArgs e) { if (listView1.SelectedIndices.Count == 0) { return; } City city = (City)listView1.SelectedItems[0].Tag; AddCityForm addCityForm = new AddCityForm(city, CountryDB); addCityForm.ShowDialog(); }