Ejemplo n.º 1
0
        private void создатьToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NewTeacherForm form = new NewTeacherForm();

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

                NewTeacherForm form = new NewTeacherForm(teacher);
                if (form.ShowDialog() == DialogResult.OK)
                {
                    UpdateGrid();
                }
            }
        }