private void 修改ToolStripMenuItem_Click(object sender, EventArgs e) { UpdateStudentForm usf = new UpdateStudentForm(); usf.MdiParent = this; usf.StartPosition = FormStartPosition.CenterScreen; usf.Show(); usf.WindowState = System.Windows.Forms.FormWindowState.Maximized; }
void DataGridView1_DoubleClick(object sender, EventArgs e) { if (this.dataGridView1.SelectedRows.Count == 1) { var @class = (Member)this.dataGridView1.SelectedRows[0].DataBoundItem; var updateForm = new UpdateStudentForm(@class.id); updateForm.ShowDialog(); this.LoadAllClasses(); } }