<%@ WebHandler Language="C#" Class="GetProductionDataCheckID_WCF" %> using System.Web; using System.Web.SessionState; using System.Web.Configuration; using Newtonsoft.Json.Linq; using Curtain.DataAccess; using Curtain.Log; using DK.XuWei.WebMes; /// /// xuwei add 2020-03-23 此方法用于成检后 回收 再次成检 获取正确ID /// public class GetProductionDataCheckID_WCF : IHttpHandler, IReadOnlySessionState { public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; if(context.Request["BarCode"].ToString()!="") { WCF wcf = new WCF(); wcf.Para = wcf.LoadParaBySession(); wcf.Para.Add(new JProperty("BarCode", context.Request["BarCode"])); //wcf.Para.Add(new JProperty("userCode", context.Request["userCode"])); string jsonStr = wcf.Post("/DKService/PDAModuleService/GetProductionDataCheckID"); jsonStr = ("{'success':true,'message':'操作成功!','rows':" + jsonStr + "}").Replace("'","\""); context.Response.Write(jsonStr); } else { string jsonStr = ""; jsonStr = ("{'success':false,'message':'请指定BarCode!','rows':''}").Replace("'","\""); context.Response.Write(jsonStr); } } public bool IsReusable { get { return false; } } }