GetProductCheckDefectPosition.ashx 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <%@ WebHandler Language="C#" Class="GetProductCheckDefectPosition" %>
  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 GetProductCheckDefectPosition : IHttpHandler, IReadOnlySessionState
  14. {
  15. public void ProcessRequest(HttpContext context)
  16. {
  17. using (IDataAccess conn = DataAccess.Create())
  18. {
  19. string sqlStr = @"
  20. SELECT
  21. DEFECTPOSITIONID, --位置编号
  22. DEFECTPOSITIONCODE, --位置编码
  23. DEFECTPOSITIONNAME --位置名称
  24. FROM
  25. TP_MST_DEFECTPOSITION
  26. WHERE
  27. VALUEFLAG = '1' --有效标识
  28. ORDER BY
  29. DISPLAYNO --显示顺序
  30. ";
  31. context.Response.Write(new JsonResult(conn.ExecuteDatatable(sqlStr)).ToJson());
  32. }
  33. }
  34. public bool IsReusable
  35. {
  36. get
  37. {
  38. return false;
  39. }
  40. }
  41. }