private void btnNewUser_Click(object sender, EventArgs e) { using (FormNewUser f = new FormNewUser()) { if (f.ShowDialog() == DialogResult.OK) { Manager.Show("New User was registered.", Notification.Type.Info); } } }
public bool EditUser() { if (CurrEditUser.UserID == 1) { Framework.Container.Instance.InteractionService.ShowMessageBox("无法编辑系统内置用户!", Framework.Environment.PROGRAM_NAME, MessageBoxButtons.OK); return(false); } FormNewUser FormNewUser = new FormNewUser(CurrEditUser, true); FormNewUser.ShowDialog(); return(true); }
private void UserSettings_Click(object sender, EventArgs e) { if (UPC.Library.LoginModels.Login.Role == "Operator") { MessageBox.Show("Operators do not have access to this section. Please contact administrator for further details.", ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information); return; } using (FormNewUser frm = new FormNewUser()) { frm.ShowDialog(); } }
public bool AddUser() { if (CurrEditUserGroup.UserGroupID == 1) { Framework.Container.Instance.InteractionService.ShowMessageBox("无法为系统内置用户组添加用户!", Framework.Environment.PROGRAM_NAME, MessageBoxButtons.OK); return(false); } FormNewUser FormNewUser = new FormNewUser(new UserInfo { UserName = string.Empty, UserGroupID = m_currEditUserGroup.UserGroupID, UserRoleType = 1 }); FormNewUser.ShowDialog(); return(true); }
private void toolStripButton1_Click(object sender, EventArgs e) { FormNewUser f = new FormNewUser(); f.ShowDialog(); }