| 1234567891011121314151617181920212223242526272829303132333435363738 |
- <%@ WebHandler Language="C#" Class="GetUserCode_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 GetUserCode_WCF : IHttpHandler, IReadOnlySessionState
- {
- public void ProcessRequest(HttpContext context)
- {
- context.Response.ContentType = "text/plain";
- WCF wcf = new WCF();
- wcf.Para = wcf.LoadParaBySession();
- wcf.Para.Add(new JProperty("usercode", context.Request["usercode"]));
- string jsonStr = wcf.Post("/DKService/PDAModuleService/GetUserCode");
- JObject json = JObject.Parse(jsonStr);
- jsonStr = ("{'success':true,'message':'操作成功!','rows':" + json["TUser"] + "}").Replace("'","\"");
- context.Response.Write(jsonStr);
- }
- public bool IsReusable
- {
- get
- {
- return false;
- }
- }
- }
|