Пример #1
0
        private void создатьToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NewDirectionForm form = new NewDirectionForm();

            if (form.ShowDialog() == DialogResult.OK)
            {
                UpdateGrid();
            }
        }
Пример #2
0
        private void редактироватьToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count > 0)
            {
                Direction directy = dataGridView1.SelectedRows[0].DataBoundItem as Direction;

                NewDirectionForm form = new NewDirectionForm(directy);
                if (form.ShowDialog() == DialogResult.OK)
                {
                    UpdateGrid();
                }
            }
        }