//人员新增 private void toolStripLabel添加_Click(object sender, EventArgs e) { login frm = new login(); frm.getName += new GetName(login_getName); frm.Message("AddAdmin"); frm.ShowDialog(); }
//修改 private void toolStripLabel修改_Click(object sender, EventArgs e) { if (((System.Windows.Forms.BaseCollection)(dataGridView1.SelectedRows)).Count > 1) { MessageBox.Show("请选择一条数据", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } else { int UserID = Convert.ToInt32(dataGridView1.CurrentRow.Cells[0].Value); login frm = new login(); frm.Message(UserID, "update"); frm.getName += new GetName(login_getName); frm.ShowDialog(); } }