一厂MES,含注塑,喷涂,冲孔
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.7 KiB

2 months ago
using MESClassLibrary.BLL.User;
using MESClassLibrary.Model;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace MESWebSite.Service
{
/// <summary>
/// SystemManager 的摘要说明
/// lx 2017-06-27
/// </summary>
public class SystemManager : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
try
{
string ActionCode = context.Request["action"].ToString().Trim();
switch (ActionCode)
{
//查询主菜单
case "GETMENU":
GetMenuJson(context);
break;
}
}
catch (Exception ex)
{
context.WriteJsonResult(null, false, ex.Message);
}
}
/// <summary>
/// 查询菜单
/// </summary>
/// <param name="context"></param>
public void GetMenuJson(HttpContext context)
{
string userID = "";
userID = context.Request.Params["userID"].ToString().Trim();
List<Sys_NavMenuInfo> navList = new Sys_NavMenuService().BuilderLeftMenu(userID);
string json = JsonConvert.SerializeObject(navList);
string result = "{\"success\":" + true.ToString().ToLower() + ",\"message\":\"\",\"data\":" + json + "}";
context.Response.Write(result);
//string x = JsonConvert.SerializeObject(navList);
//context.WriteJsonResult(null);
}
public bool IsReusable
{
get
{
return false;
}
}
}
}