private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { int a = (int)dataGridView1.Rows[e.RowIndex].Cells[0].Value; //获取选中行指定列 if (wz == 1) //管理部门页面 { bmtj.setVisible(1); //设置为修改页面 bmtj.setId(a); bmtj.BringToFront(); bmtj.Show(); } else if (wz == 2) { glyg.setVisible(1); glyg.setId(a); glyg.BringToFront(); glyg.Show(); } else if (wz == 3) { gzgl.setVisible(1); gzgl.setId(a); gzgl.BringToFront(); gzgl.Show(); } }
private void 添加员工ToolStripMenuItem_Click(object sender, EventArgs e) { if (glyg == null) { glyg = new 管理员工(); glyg.MdiParent = this; glyg.setGl(this); } glyg.setVisible(0); glyg.BringToFront(); glyg.Show(); }