| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
-
- <%@ WebHandler Language="C#" Class="Get_Report_Kiln" %>
- 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_Kiln : IHttpHandler,IRequiresSessionState
- {
- public void ProcessRequest(HttpContext context)
- {
- if (HttpContext.Current.Session["userCode"] is object)
- {
- using (IDataAccess conn = DataAccess.Create())
- {
- //统计语句
- string sqlStr = @"
- SELECT
- KILNCODE,
- KILNNAME
- FROM
- TP_MST_KILN
- WHERE
- ACCOUNTID = 1
- AND VALUEFLAG = '1'
- ORDER BY
- KILNCODE DESC
- ";
- 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;
- }
- }
- }
|