private void CheckBoxCommand()
 {
     if (RoleActionEntity == null)
     {
         RoleActionEntity            = new RoleActionEntity();
         RoleActionEntity.IsPermit   = IsAccessSet;
         RoleActionEntity.RoleID     = CurrentRoleEntity.RoleID;
         RoleActionEntity.ActionID   = ActionEntity.ActionID;
         RoleActionEntity.RoleAction = new ProductManager.Web.Model.role_action();
         RoleActionEntity.DUpdate();
         SystemManageDomainContext.role_actions.Add(RoleActionEntity.RoleAction);
         UpdateChanged("IsAccess");
     }
     else
     {
         RoleActionEntity.IsPermit = IsAccessSet;
         RoleActionEntity.DUpdate();
     }
 }
        private void OnCheckBoxCommand()
        {
            if (RoleActionEntity == null)
            {
                RoleActionEntity = new RoleActionEntity();
                RoleActionEntity.IsPermit = IsAccessSet;
                RoleActionEntity.RoleID = CurrentRoleEntity.RoleID;
                RoleActionEntity.ActionID = ActionEntity.ActionID;
                RoleActionEntity.RoleAction = new ProductManager.Web.Model.role_action();
                RoleActionEntity.DUpdate();
                SystemManageDomainContext.role_actions.Add(RoleActionEntity.RoleAction);
                UpdateChanged("IsAccess");
            }
            else
            {
                RoleActionEntity.IsPermit = IsAccessSet;
                RoleActionEntity.DUpdate();
            }

            if (!IsAccessSet)
            {
                if (ChildList != null)
                {
                    foreach (ActionAndRoleActionEntity actionAndRoleActionEntity in ChildList)
                    {
                        if (actionAndRoleActionEntity.RoleActionEntity != null)
                        {
                            actionAndRoleActionEntity.RoleActionEntity.IsPermit = IsAccessSet;
                            actionAndRoleActionEntity.IsAccessSet = IsAccessSet;
                            if (actionAndRoleActionEntity.ChildList != null)
                            {
                                actionAndRoleActionEntity.OnCheckBoxCommand();
                            }
                            else
                            {
                                actionAndRoleActionEntity.CheckBoxCommand();
                            }
                            actionAndRoleActionEntity.UpdateChanged("IsAccess");
                        }
                    }
                }
            }

            if (IsAccessSet)
            {
                if (ChildList != null)
                {
                    foreach (ActionAndRoleActionEntity actionAndRoleActionEntity in ChildList)
                    {
                        actionAndRoleActionEntity.IsAccessSet = IsAccessSet;
                        actionAndRoleActionEntity.OnCheckBoxCommand();
                    }
                }
            }

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

            UpdateChanged("IsAccess");
        }
 private void CheckBoxCommand()
 {
     if (RoleActionEntity == null)
     {
         RoleActionEntity = new RoleActionEntity();
         RoleActionEntity.IsPermit = IsAccessSet;
         RoleActionEntity.RoleID = CurrentRoleEntity.RoleID;
         RoleActionEntity.ActionID = ActionEntity.ActionID;
         RoleActionEntity.RoleAction = new ProductManager.Web.Model.role_action();
         RoleActionEntity.DUpdate();
         SystemManageDomainContext.role_actions.Add(RoleActionEntity.RoleAction);
         UpdateChanged("IsAccess");
     }
     else
     {
         RoleActionEntity.IsPermit = IsAccessSet;
         RoleActionEntity.DUpdate();
     }
 }
        private void OnCheckBoxCommand()
        {
            if (RoleActionEntity == null)
            {
                RoleActionEntity            = new RoleActionEntity();
                RoleActionEntity.IsPermit   = IsAccessSet;
                RoleActionEntity.RoleID     = CurrentRoleEntity.RoleID;
                RoleActionEntity.ActionID   = ActionEntity.ActionID;
                RoleActionEntity.RoleAction = new ProductManager.Web.Model.role_action();
                RoleActionEntity.DUpdate();
                SystemManageDomainContext.role_actions.Add(RoleActionEntity.RoleAction);
                UpdateChanged("IsAccess");
            }
            else
            {
                RoleActionEntity.IsPermit = IsAccessSet;
                RoleActionEntity.DUpdate();
            }

            if (!IsAccessSet)
            {
                if (ChildList != null)
                {
                    foreach (ActionAndRoleActionEntity actionAndRoleActionEntity in ChildList)
                    {
                        if (actionAndRoleActionEntity.RoleActionEntity != null)
                        {
                            actionAndRoleActionEntity.RoleActionEntity.IsPermit = IsAccessSet;
                            actionAndRoleActionEntity.IsAccessSet = IsAccessSet;
                            if (actionAndRoleActionEntity.ChildList != null)
                            {
                                actionAndRoleActionEntity.OnCheckBoxCommand();
                            }
                            else
                            {
                                actionAndRoleActionEntity.CheckBoxCommand();
                            }
                            actionAndRoleActionEntity.UpdateChanged("IsAccess");
                        }
                    }
                }
            }

            if (IsAccessSet)
            {
                if (ChildList != null)
                {
                    foreach (ActionAndRoleActionEntity actionAndRoleActionEntity in ChildList)
                    {
                        actionAndRoleActionEntity.IsAccessSet = IsAccessSet;
                        actionAndRoleActionEntity.OnCheckBoxCommand();
                    }
                }
            }


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

            UpdateChanged("IsAccess");
        }