private void btnUserEdit_Click(object sender, System.EventArgs e) { if (this.lvUsers.SelectedItems.Count > 0) { EditUserForm form = new EditUserForm(this, mProject, mPrivileges, CreateUser(lvUsers.SelectedItems[0])); form.ShowDialog(this); } }
private void btnAddUser_Click(object sender, EventArgs e) { MOG_Privileges privs = MOG_ControllerProject.GetPrivileges(); if (privs != null) { if (!privs.GetUserPrivilege(MOG_ControllerProject.GetUserName_DefaultAdmin(), MOG_PRIVILEGE.AddNewUser)) { MOG_Prompt.PromptResponse("Insufficient Privileges", "Your privileges do not allow you to add users."); return; } } EditUserForm form = new EditUserForm(this, mProject, mPrivileges, null); form.ShowDialog(this); }