示例#1
0
 internal void OnSecurityNotification(SecurityEventArgs e)
 {
     if (SecurityNotification != null)
     {
         SecurityNotification(this, e);
     }
 }
示例#2
0
        ///<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();
            }
        }
示例#3
0
        ///<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();
            }
        }
示例#4
0
        ///<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;
            }
        }
示例#5
0
        ///<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.
            }
        }
示例#6
0
        ///<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.
            }
        }
示例#7
0
        private DialogResult userControlSecurityTabs_GroupPermissionChecked(object sender, SecurityEventArgs e)
        {
            FormCentralGroupPermEdit FormCG = new FormCentralGroupPermEdit(e.Perm);

            FormCG.ShowDialog();
            return(FormCG.DialogResult);
        }
示例#8
0
        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);
        }