/// <summary> /// 编辑学生信息 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void tsXjStudent_Click(object sender, EventArgs e) { FrmStuNews few = new FrmStuNews(); few.MdiParent = this;//设置父窗体容器=当前窗体 few.Show(); }
/// <summary> /// 修改学生信息 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void tsmiUpdate_Click(object sender, EventArgs e) { if (this.lvStudent.SelectedItems.Count > 0) { FrmStuNews frm = new FrmStuNews(); //将选中的学号传递到"编辑学生信息"窗体 frm.studentNo = (this.lvStudent.SelectedItems[0].Text); frm.Show(); } else { MessageBox.Show("请选择一名学生", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } }