//员工权限 private void authoTool_Click(object sender, EventArgs e) { if (!BathClass.getAuthority(db, LogIn.m_User, "权限管理")) { GeneralClass.printErrorMsg("没有权限!"); return; } if (dgv.CurrentCell == null) { GeneralClass.printWarningMsg("没有选择行!"); return; } string selId = dgv.CurrentRow.Cells[0].Value.ToString(); var employee = db.Employee.FirstOrDefault(x => x.id == selId); EmployeeAuthorityForm eauthoForm = new EmployeeAuthorityForm(db, employee); eauthoForm.ShowDialog(); }