internal void OnSecurityNotification(SecurityEventArgs e) { if (SecurityNotification != null) { SecurityNotification(this, e); } }
///<summary>Edit user group button.</summary> private void userControlSecurityTabs_EditUserGroupClick(object sender, SecurityEventArgs e) { FormCentralUserGroupEdit FormU = new FormCentralUserGroupEdit(e.Group); FormU.ShowDialog(); if (FormU.DialogResult == DialogResult.OK) { userControlSecurityTabs.FillListUserGroupTabUserGroups(); } }
///<summary>Edit user button.</summary> private void userControlSecurityTabs_EditUserClick(object sender, SecurityEventArgs e) { FormCentralUserEdit FormCUE = new FormCentralUserEdit(e.User); FormCUE.ShowDialog(); if (FormCUE.DialogResult == DialogResult.OK) { userControlSecurityTabs.FillUserTabUsers(); userControlSecurityTabs.RefreshUserTabGroups(); } }
///<summary>Add user group button.</summary> private void userControlSecurityTabs_AddUserGroupClick(object sender, SecurityEventArgs e) { UserGroup group = new UserGroup(); group.IsNew = true; FormCentralUserGroupEdit FormU = new FormCentralUserGroupEdit(group); FormU.ShowDialog(); if (FormU.DialogResult == DialogResult.OK) { userControlSecurityTabs.FillListUserGroupTabUserGroups(); userControlSecurityTabs.SelectedUserGroup = group; } }
///<summary>Add user button.</summary> private void userControlSecurityTabs_AddUserClick(object sender, SecurityEventArgs e) { Userod user = new Userod(); user.IsNew = true; FormCentralUserEdit FormCU = new FormCentralUserEdit(user); FormCU.ShowDialog(); if (FormCU.DialogResult == DialogResult.OK) //update to reflect changes that were made in FormUserEdit. { userControlSecurityTabs.FillUserTabUsers(); userControlSecurityTabs.RefreshUserTabGroups(); userControlSecurityTabs.SelectedUser = FormCU.UserCur; //select the user that was just added. } }
///<summary>Add user button.</summary> private void userControlSecurityTabs_AddUserClick(object sender, SecurityEventArgs e) { Userod user = new Userod(); user.IsNew = true; FormCentralUserEdit FormCU = new FormCentralUserEdit(user); FormCU.ShowDialog(); if (FormCU.DialogResult == DialogResult.OK) //update to reflect changes that were made in FormUserEdit. { userControlSecurityTabs.FillGridUsers(); //New user is not in grid yet, add them. userControlSecurityTabs.SelectedUser = FormCU.UserCur; //Selects the user that was just added in the grid. userControlSecurityTabs.RefreshUserTabGroups(); //Previously selected users User Groups are still selected, refresh for UserCur. } }
private DialogResult userControlSecurityTabs_GroupPermissionChecked(object sender, SecurityEventArgs e) { FormCentralGroupPermEdit FormCG = new FormCentralGroupPermEdit(e.Perm); FormCG.ShowDialog(); return(FormCG.DialogResult); }
private DialogResult userControlSecurityTabs_ReportPermissionChecked(object sender, SecurityEventArgs e) { GroupPermission perm = e.Perm; FormCentralReportSetup FormCRS = new FormCentralReportSetup(perm.UserGroupNum, true); FormCRS.ShowDialog(); if (FormCRS.DialogResult == DialogResult.Cancel) { return(FormCRS.DialogResult); } if (!FormCRS.HasReportPerms) //Only insert base Reports permission if the user actually has any reports allowed { return(FormCRS.DialogResult); } try { GroupPermissions.Insert(perm); } catch (Exception ex) { MessageBox.Show(ex.Message); return(DialogResult.Cancel); } return(FormCRS.DialogResult); }