| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <%@ WebHandler Language="C#" Class="GetCompleteProcedureIDPDA_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;
- /// <summary>
- /// 从WCF接口获取 产品信息
- /// xuwei 2019-10-26
- /// </summary>
- public class GetCompleteProcedureIDPDA_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"]));
- string jsonStr = wcf.Post("/DKService/PDAModuleService/GetCompleteProcedureIDPDA");
- 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;
- }
- }
- }
|