| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <%@ WebHandler Language="C#" Class="Get_Report_RptProcedure" %>
- 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_RptProcedure : IHttpHandler,IRequiresSessionState
- {
- public void ProcessRequest(HttpContext context)
- {
- if (HttpContext.Current.Session["userCode"] is object)
- {
- using (IDataAccess conn = DataAccess.Create())
- {
- //统计语句
- string sqlStr = @"
- SELECT
- p.RPTPROCEDUREID,
- p.RPTPROCEDURENAME
- FROM
- TP_MST_RPTPROCEDURE p
- WHERE
- p.VALUEFLAG = '1'
- ORDER BY
- p.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;
- }
- }
- }
|