private void 添加班级ToolStripMenuItem_Click(object sender, EventArgs e) { AddClass ac = new AddClass(); ac.Owner = this; ac.ShowDialog(); }
private void New_Click(object sender, EventArgs e) { AddClass addClass = new AddClass(); addClass.ShowDialog(); bindGridView(null, tvClassInfo.SelectedNode); }
private void Edit_Click(object sender, EventArgs e) { if (dGClassInfo.SelectedRows.Count > 1) { MessageBox.Show("只能选择一条班级信息进行修改!", "信息提示"); return; } else if (dGClassInfo.SelectedRows.Count == 0) { MessageBox.Show("请选择需要修改的班级!", "信息提示"); return; } else { AddClass update = new AddClass(); update.FormText = "修改班级信息"; update.Tag = dGClassInfo.SelectedRows[0].Cells["班级编号"].Value; update.ShowDialog(); bindGridView(null, tvClassInfo.SelectedNode); } }