コード例 #1
0
 private void CheckBoxCommand()
 {
     if (UserActionEntity == null)
     {
         UserActionEntity            = new UserActionEntity();
         UserActionEntity.IsPermit   = IsAccessSet;
         UserActionEntity.ActionID   = ActionEntity.ActionID;
         UserActionEntity.UserID     = CurrentSelectUserEntity.UserID;
         UserActionEntity.UserAction = new ProductManager.Web.Model.user_action();
         UserActionEntity.DUpdate();
         SystemManageDomainContext.user_actions.Add(UserActionEntity.UserAction);
         UpdateChanged("IsAccess");
     }
     else
     {
         UserActionEntity.IsPermit = IsAccessSet;
         UserActionEntity.DUpdate();
     }
 }
コード例 #2
0
        private void OnCheckBoxCommand()
        {
            if (UserActionEntity == null)
            {
                UserActionEntity            = new UserActionEntity();
                UserActionEntity.IsPermit   = IsAccessSet;
                UserActionEntity.ActionID   = ActionEntity.ActionID;
                UserActionEntity.UserID     = CurrentSelectUserEntity.UserID;
                UserActionEntity.UserAction = new ProductManager.Web.Model.user_action();
                UserActionEntity.DUpdate();
                SystemManageDomainContext.user_actions.Add(UserActionEntity.UserAction);
                UpdateChanged("IsAccess");
            }
            else
            {
                UserActionEntity.IsPermit = IsAccessSet;
                UserActionEntity.DUpdate();
            }

            if (!IsAccessSet)
            {
                if (ChildList != null)
                {
                    foreach (ActionAndUserActionEntity actionAndUserActionEntity in ChildList)
                    {
                        if (actionAndUserActionEntity.UserActionEntity != null)
                        {
                            actionAndUserActionEntity.UserActionEntity.IsPermit = IsAccessSet;
                            actionAndUserActionEntity.IsAccessSet = IsAccessSet;
                            if (actionAndUserActionEntity.ChildList != null)
                            {
                                actionAndUserActionEntity.OnCheckBoxCommand();
                            }
                            else
                            {
                                actionAndUserActionEntity.CheckBoxCommand();
                            }
                            actionAndUserActionEntity.UpdateChanged("IsAccess");
                        }
                    }
                }
            }

            if (IsAccessSet)
            {
                if (ChildList != null)
                {
                    foreach (ActionAndUserActionEntity actionAndUserActionEntity in ChildList)
                    {
                        actionAndUserActionEntity.IsAccessSet = IsAccessSet;
                        actionAndUserActionEntity.OnCheckBoxCommand();
                    }
                }
            }

            if (ParentActionAdnUserActionEntity != null)
            {
                if (IsAccessSet == true)
                {
                    if (ParentActionAdnUserActionEntity.IsAccessSet == false)
                    {
                        ParentActionAdnUserActionEntity.IsAccessSet = true;
                        ParentActionAdnUserActionEntity.CheckBoxCommand();
                    }
                    ParentActionAdnUserActionEntity.UpdateChanged("IsAccess");
                }
            }

            UpdateChanged("IsAccess");
        }
コード例 #3
0
        private void OnCheckBoxCommand()
        {
            if (UserActionEntity == null)
            {
                UserActionEntity = new UserActionEntity();
                UserActionEntity.IsPermit = IsAccessSet;
                UserActionEntity.ActionID = ActionEntity.ActionID;
                UserActionEntity.UserID = CurrentSelectUserEntity.UserID;
                UserActionEntity.UserAction = new ProductManager.Web.Model.user_action();
                UserActionEntity.DUpdate();
                SystemManageDomainContext.user_actions.Add(UserActionEntity.UserAction);
                UpdateChanged("IsAccess");
            }
            else
            {
                UserActionEntity.IsPermit = IsAccessSet;
                UserActionEntity.DUpdate();
            }

            if (!IsAccessSet)
            {
                if (ChildList != null)
                {
                    foreach (ActionAndUserActionEntity actionAndUserActionEntity in ChildList)
                    {
                        if (actionAndUserActionEntity.UserActionEntity != null)
                        {
                            actionAndUserActionEntity.UserActionEntity.IsPermit = IsAccessSet;
                            actionAndUserActionEntity.IsAccessSet = IsAccessSet;
                            if (actionAndUserActionEntity.ChildList != null)
                            {
                                actionAndUserActionEntity.OnCheckBoxCommand();
                            }
                            else
                            {
                                actionAndUserActionEntity.CheckBoxCommand();
                            }
                            actionAndUserActionEntity.UpdateChanged("IsAccess");
                        }
                    }
                }
            }

            if (IsAccessSet)
            {
                if (ChildList != null)
                {
                    foreach (ActionAndUserActionEntity actionAndUserActionEntity in ChildList)
                    {
                        actionAndUserActionEntity.IsAccessSet = IsAccessSet;
                        actionAndUserActionEntity.OnCheckBoxCommand();
                    }
                }
            }

            if (ParentActionAdnUserActionEntity != null)
            {
                if (IsAccessSet == true)
                {
                    if (ParentActionAdnUserActionEntity.IsAccessSet == false)
                    {
                        ParentActionAdnUserActionEntity.IsAccessSet = true;
                        ParentActionAdnUserActionEntity.CheckBoxCommand();
                    }
                    ParentActionAdnUserActionEntity.UpdateChanged("IsAccess");
                }
            }

            UpdateChanged("IsAccess");
        }
コード例 #4
0
 private void CheckBoxCommand()
 {
     if (UserActionEntity == null)
     {
         UserActionEntity = new UserActionEntity();
         UserActionEntity.IsPermit = IsAccessSet;
         UserActionEntity.ActionID = ActionEntity.ActionID;
         UserActionEntity.UserID = CurrentSelectUserEntity.UserID;
         UserActionEntity.UserAction = new ProductManager.Web.Model.user_action();
         UserActionEntity.DUpdate();
         SystemManageDomainContext.user_actions.Add(UserActionEntity.UserAction);
         UpdateChanged("IsAccess");
     }
     else
     {
         UserActionEntity.IsPermit = IsAccessSet;
         UserActionEntity.DUpdate();
     }
 }