Exemplo n.º 1
0
        private string Edit(HttpContext context)
        {
            //#region 权限处理
            //if (!DataLoadTool.CheckCurrUserPms(PermissionKey.Pms_Permission_EditPermission))
            //{
            //    return "无权编辑权限";
            //}
            //#endregion
            string         jsonData = context.Request["JsonData"];
            PermissionInfo model    = ZentCloud.Common.JSONHelper.JsonToModel <PermissionInfo>(jsonData);
            bool           result   = bllPer.Update(model);

            return(result.ToString().ToLower());
        }
Exemplo n.º 2
0
        private string Edit(HttpContext context)
        {
            //#region 权限处理
            //if (!DataLoadTool.CheckCurrUserPms(PermissionKey.Pms_Menu_EditMenu))
            //{
            //    return "无权修改菜单信息";
            //}
            //#endregion

            string   jsonData = context.Request["JsonData"];
            MenuInfo menuInfo = ZentCloud.Common.JSONHelper.JsonToModel <MenuInfo>(jsonData);

            MenuInfo menuOld = pmsBll.Get <MenuInfo>(string.Format(" MenuID={0} ", menuInfo.MenuID));
            bool     result  = pmsBll.Update(menuInfo);

            if (result && menuInfo.ShowLevel != menuOld.ShowLevel)
            {
                pmsBll.UpdateChildShowLevel(menuInfo.MenuID, menuInfo.ShowLevel);
            }
            return(result.ToString().ToLower());
        }