public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; //context.Response.Write("Hello World"); string action = context.Request.QueryString["action"]; switch (action) { case "GetDevicesListByUserID": MG_BLL.BllMonitor mo = new MG_BLL.BllMonitor(); string UserID = context.Request.Params["UserID"]; string msgCount = default(string); List <Devices> json = mo.GetDevicesByUserID_Bll(UserID, ref msgCount); // return "{\"aa\":\"11\"}"; // return Utils.GetSession() as LoginUserInfo; context.Response.Write(Utils.ToJson(json)); break; case "GetDeviceInfo": string Imei = context.Request.Params["Imei"]; BllMonitor bmo = new BllMonitor(); context.Response.Write(bmo.GetDeviceInfo(Imei)); break; default: break; } }
public string GetDevicesName(string UserID) { MG_BLL.BllMonitor mo = new MG_BLL.BllMonitor(); string msgCount = default(string); List <Devices> json = mo.GetDevicesByUserID_Bll(UserID, ref msgCount); return(Utils.ToJson(json)); }
//[SoapHeader("SoapHeaderValue")] public string GetDevicesListByUserID(String UserID) { MG_BLL.BllMonitor mo = new MG_BLL.BllMonitor(); string msgCount = default(string); List <Devices> json = mo.GetDevicesByUserID_Bll(UserID, ref msgCount); Dictionary <string, object> dic = new Dictionary <string, object>(); dic.Add("msgCount", msgCount); dic.Add("data", json); return(Utils.ToJson(dic)); }