| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
-
- <%@ WebHandler Language="C#" Class="Get_Report_Position" %>
- using System;
- using System.Collections.Generic;
- using System.Web;
- using System.Web.SessionState;
- using System.Configuration;
- using System.Data;
- using Newtonsoft.Json;
- using Curtain.DataAccess;
- using Curtain.Log;
- using DK.XuWei.WebMes;
- public class Get_Report_Position : IHttpHandler,IRequiresSessionState
- {
- public void ProcessRequest(HttpContext context)
- {
- if (HttpContext.Current.Session["userCode"] is object)
- {
- using (IDataAccess conn = DataAccess.Create())
- {
- //统计语句
- string sqlStr = @"
- SELECT
- DEFECTPOSITIONID, --位置编号
- DEFECTPOSITIONCODE, --位置编码
- DEFECTPOSITIONNAME --位置名称
- FROM
- TP_MST_DEFECTPOSITION
- WHERE
- VALUEFLAG = '1' --有效标识
- ORDER BY
- DISPLAYNO --显示顺序
- ";
- DataTable dt = conn.ExecuteDatatable(sqlStr);
- //输出结果
- context.Response.Write(new JsonResult(dt).ToJson());
- }
- }
- else
- {
- context.Response.Write(new JsonResult(-1).ToJson());
- }
- }
- public bool IsReusable
- {
- get
- {
- return false;
- }
- }
- }
|