private void CheckBoxCommand()
 {
     if (UserActionEntity == null)
     {
         UserActionEntity            = new UserActionEntity();
         UserActionEntity.HasRight   = IsAccessSet;
         UserActionEntity.ActionID   = ActionEntity.ActionId;
         UserActionEntity.UserID     = CurrentSelectUserEntity.UserId;
         UserActionEntity.UserAction = new DocumentManager.Web.Model.useraction();
         UserActionEntity.DUpdate();
         DocumentManagerDomainContext.useractions.Add(UserActionEntity.UserAction);
         UpdateChanged("IsAccess");
     }
     else
     {
         UserActionEntity.HasRight = IsAccessSet;
         UserActionEntity.DUpdate();
     }
 }
        private void OnCheckBoxCommand()
        {
            if (UserActionEntity == null)
            {
                UserActionEntity = new UserActionEntity();
                UserActionEntity.HasRight = IsAccessSet;
                UserActionEntity.ActionID = ActionEntity.ActionId;
                UserActionEntity.UserID = CurrentSelectUserEntity.UserId;
                UserActionEntity.UserAction = new DocumentManager.Web.Model.useraction();
                UserActionEntity.DUpdate();
                DocumentManagerDomainContext.useractions.Add(UserActionEntity.UserAction);
                UpdateChanged("IsAccess");
            }
            else
            {
                UserActionEntity.HasRight = IsAccessSet;
                UserActionEntity.DUpdate();
            }

            if (!IsAccessSet)
            {
                if (ChildList != null)
                {
                    foreach (ActionAndUserActionEntity actionAndUserActionEntity in ChildList)
                    {
                        if (actionAndUserActionEntity.UserActionEntity != null)
                        {
                            actionAndUserActionEntity.UserActionEntity.HasRight = 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");
        }
        private void OnCheckBoxCommand()
        {
            if (UserActionEntity == null)
            {
                UserActionEntity            = new UserActionEntity();
                UserActionEntity.HasRight   = IsAccessSet;
                UserActionEntity.ActionID   = ActionEntity.ActionId;
                UserActionEntity.UserID     = CurrentSelectUserEntity.UserId;
                UserActionEntity.UserAction = new DocumentManager.Web.Model.useraction();
                UserActionEntity.DUpdate();
                DocumentManagerDomainContext.useractions.Add(UserActionEntity.UserAction);
                UpdateChanged("IsAccess");
            }
            else
            {
                UserActionEntity.HasRight = IsAccessSet;
                UserActionEntity.DUpdate();
            }

            if (!IsAccessSet)
            {
                if (ChildList != null)
                {
                    foreach (ActionAndUserActionEntity actionAndUserActionEntity in ChildList)
                    {
                        if (actionAndUserActionEntity.UserActionEntity != null)
                        {
                            actionAndUserActionEntity.UserActionEntity.HasRight = 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");
        }
 private void CheckBoxCommand()
 {
     if (UserActionEntity == null)
     {
         UserActionEntity = new UserActionEntity();
         UserActionEntity.HasRight = IsAccessSet;
         UserActionEntity.ActionID = ActionEntity.ActionId;
         UserActionEntity.UserID = CurrentSelectUserEntity.UserId;
         UserActionEntity.UserAction = new DocumentManager.Web.Model.useraction();
         UserActionEntity.DUpdate();
         DocumentManagerDomainContext.useractions.Add(UserActionEntity.UserAction);
         UpdateChanged("IsAccess");
     }
     else
     {
         UserActionEntity.HasRight = IsAccessSet;
         UserActionEntity.DUpdate();
     }
 }