testSyncZhongTai.ashx 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <%@ WebHandler Language="C#" Class="testSyncZhongTai" %>
  2. using System;
  3. using System.Web;
  4. using System.IO;
  5. using System.Text;
  6. using System.Data;
  7. using Curtain.DataAccess;
  8. using DK.XuWei.WebMes;
  9. using Newtonsoft.Json.Linq;
  10. using System.Web.SessionState;
  11. using Curtain.Extension.ExObjectConvert;
  12. /// <summary>
  13. /// apiid=31014
  14. /// SAP:物料bom同步接口
  15. /// </summary>
  16. public class testSyncZhongTai : IHttpHandler, IReadOnlySessionState
  17. {
  18. public void ProcessRequest(HttpContext context)
  19. {
  20. context.Response.ContentType = "text/plain";
  21. DateTime syncDate = new DateTime(2023, 3, 2);
  22. context.Response.Write(DateTime.Now + ":调用开始\n");
  23. string msg = SyncZhongTai.SyncFinishedProduct(syncDate, false);
  24. context.Response.Write(DateTime.Now + ":调用结束\n");
  25. context.Response.Write(new JsonResult() { success = true, status = JsonStatus.success, message = msg }.ToJson());
  26. }
  27. public bool IsReusable
  28. {
  29. get
  30. {
  31. return false;
  32. }
  33. }
  34. }