| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <%@ WebHandler Language="C#" Class="SyncZhongTai" %>
- using System;
- using System.Web;
- using System.IO;
- using System.Text;
- using System.Data;
- using Curtain.DataAccess;
- using DK.XuWei.WebMes;
- using Newtonsoft.Json.Linq;
- using System.Web.SessionState;
- using Curtain.Extension.ExObjectConvert;
- /// <summary>
- /// apiid=31014
- /// SAP:物料bom同步接口
- /// </summary>
- public class SyncZhongTai : IHttpHandler, IReadOnlySessionState
- {
- public void ProcessRequest(HttpContext context)
- {
- context.Response.ContentType = "text/plain";
- DateTime syncDate = new DateTime(2023, 3, 2);
- string jsonPara = JsonPost.Parameter();
- if (!string.IsNullOrEmpty(jsonPara))
- {
- JObject json = JObject.Parse(jsonPara);
- DateTime.TryParse(json["SyncDate"].ToStringEx(), out syncDate);
- }
- string msg = string.Empty;
- //context.Response.Write(DateTime.Now + ":调用开始\n");
- msg = SyncZhongTai.SyncFinishedProduct(syncDate, false);
- //context.Response.Write(DateTime.Now + ":调用结束\n");
- context.Response.Write(new JsonResult() { success = true, status = JsonStatus.success, message = msg }.ToJson());
- }
- public bool IsReusable
- {
- get
- {
- return false;
- }
- }
- }
|