Beispiel #1
0
        private void dataGridView1_DoubleClick(object sender, EventArgs e)
        {
            editClassForm editClass = new editClassForm();

            editClass.comboBoxClassName.SelectedValue = dataGridView1.CurrentRow.Cells[0].Value.ToString();
            editClass.numericUpDownClassRoom.Text     = dataGridView1.CurrentRow.Cells[1].Value.ToString();
            editClass.numericUpDownNumberPupil.Text   = dataGridView1.CurrentRow.Cells[2].Value.ToString();
            editClass.ShowDialog(this);
        }
Beispiel #2
0
        private void изменитToolStripMenuItem_Click(object sender, EventArgs e)
        {
            editClassForm editClass = new editClassForm(); bool exit = false;

            for (int i = 0; i < this.MdiChildren.Length; i++)
            {
                if (this.MdiChildren[i].Name == "editClass")
                {
                    exit = true;
                }
            }
            if (exit == false)
            {
                editClass.MdiParent = this;
                editClass.Show();
            }
        }