예제 #1
0
        private void создатьToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NewCountryForm form = new NewCountryForm();

            if (form.ShowDialog() == DialogResult.OK)
            {
                UpdateGrid();
            }
        }
예제 #2
0
        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();
                }
            }
        }