private void создатьToolStripMenuItem_Click(object sender, EventArgs e) { NewCountryForm form = new NewCountryForm(); if (form.ShowDialog() == DialogResult.OK) { UpdateGrid(); } }
private void редактироватьToolStripMenuItem_Click(object sender, EventArgs e) { if (dataGridView1.SelectedRows.Count > 0) { Country country = dataGridView1.SelectedRows[0].DataBoundItem as Country; NewCountryForm form = new NewCountryForm(country); if (form.ShowDialog() == DialogResult.OK) { UpdateGrid(); } } }