GetDutyStaffByUserJobsID_WCF.ashx 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <%@ WebHandler Language="C#" Class="GetDutyStaffByUserJobsID_WCF" %>
  2. using System.Web;
  3. using System.Web.SessionState;
  4. using System.Web.Configuration;
  5. using Newtonsoft.Json.Linq;
  6. using Curtain.DataAccess;
  7. using Curtain.Log;
  8. using DK.XuWei.WebMes;
  9. /// <summary>
  10. /// 从WCF接口获取
  11. /// xuwei 2019-10-26
  12. /// </summary>
  13. public class GetDutyStaffByUserJobsID_WCF : IHttpHandler, IReadOnlySessionState
  14. {
  15. public void ProcessRequest(HttpContext context)
  16. {
  17. context.Response.ContentType = "text/plain";
  18. WCF wcf = new WCF();
  19. wcf.Para = wcf.LoadParaBySession();
  20. wcf.Para.Add(new JProperty("userid", context.Request["userid"]));
  21. wcf.Para.Add(new JProperty("jobs", context.Request["jobs"]));
  22. string jsonStr = wcf.Post("/DKService/PDAModuleService/GetDutyStaffByUserJobsID");
  23. jsonStr = ("{'success':true,'message':'操作成功!','rows':" + jsonStr + "}").Replace("'","\"");
  24. context.Response.Write(jsonStr);
  25. }
  26. public bool IsReusable
  27. {
  28. get
  29. {
  30. return false;
  31. }
  32. }
  33. }