/// <summary> /// /// </summary> /// <param name="context"></param> public void ProcessRequest(HttpContext context) { DataTable dtAll = us.BindPowerByJosn(); //查询全部权限 string strjson = string.Empty; if (context.Request.QueryString["Type"] == "View" && !string.IsNullOrEmpty(context.Request.QueryString["GA02001"])) //判断是否是查看 { DataTable dtPart = new BLL.UserBLL().SelectSystemPowerBySystemRoleId(context.Request.QueryString["GA02001"]); //根绝角色id查询菜单 strjson = ToViewJson(dtAll, dtPart); } else if (context.Request.QueryString["Type"] == "Edit" && !string.IsNullOrEmpty(context.Request.QueryString["GA02001"])) //判断是否是编辑 { DataTable dtPart = new BLL.UserBLL().SelectSystemPowerBySystemRoleId(context.Request.QueryString["GA02001"]); //根绝角色id查询菜单 strjson = ToEditJson(dtAll, dtPart); } else { strjson = ToInitJson(dtAll); } context.Response.Write(strjson); }