private string Add(HttpContext context) { //#region 权限处理 //if (!DataLoadTool.CheckCurrUserPms(PermissionKey.Pms_PermissionGroup_AddPermissionGroup)) //{ // return "无权添加权限组"; //} //#endregion string jsonData = context.Request["JsonData"]; PermissionGroupInfo model = ZentCloud.Common.JSONHelper.JsonToModel <PermissionGroupInfo>(jsonData); model.GroupID = long.Parse(bllPer.GetGUID(Common.TransacType.PermissionGroupAdd)); model.PreID = 0; if (model.GroupType == 2) { model.WebsiteOwner = bllPer.WebsiteOwner; } bool result = bllPer.Add(model); return(result.ToString().ToLower()); }
private string Add(HttpContext context) { //#region 权限处理 //if (!DataLoadTool.CheckCurrUserPms(PermissionKey.Pms_Menu_AddMenu)) //{ // return "无权添加菜单"; //} //#endregion try { string jsonData = context.Request["JsonData"]; MenuInfo menuInfo = ZentCloud.Common.JSONHelper.JsonToModel <MenuInfo>(jsonData); menuInfo.MenuID = long.Parse(pmsBll.GetGUID(Common.TransacType.MenuAdd)); bool result = pmsBll.Add(menuInfo); return(result.ToString().ToLower()); } catch (Exception ex) { return(ex.ToString()); } }