| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <%@ WebHandler Language="C#" Class="list" %>
- using System;
- using System.Web;
- using System.Web.SessionState;
- using System.Collections.Generic;
- using System.Data;
- using Curtain.DataAccess;
- using DK.XuWei.WebMes;
- public class list : IHttpHandler, IReadOnlySessionState
- {
- public void ProcessRequest(HttpContext context)
- {
- context.Response.ContentType = "text/plain";
- if (context.Request["m"] is object)
- {
- //不验证帐套 默认为1
- int accountId = (context.Session["accountId"] is object) ?
- Convert.ToInt32(context.Session["accountId"]) : 1;
- switch (context.Request["m"].ToString())
- {
- case "getMSTDictionary": // 获取数据字典
- {
- using (IDataAccess conn = DataAccess.Create())
- {
- DataTable dt = conn.ExecuteDatatable(@"
- SELECT DICTIONARYTYPE,
- DICTIONARYVALUE
- FROM tp_mst_datadictionary
- WHERE VALUEFLAG = '1'
- AND ACCOUNTID = 1
- AND DICTIONARYTYPE = @DICTIONARYTYPE@
- ORDER BY DISPLAYNO ",
- new CDAParameter("ACCOUNTID", accountId),
- new CDAParameter("DICTIONARYTYPE", context.Request["dictionarytype"])
- );
- context.Response.Write(dt.ToJson());
- }
- break;
- }
- default:
- {
- break;
- }
- }
- }
- //else
- //{
- // context.Response.Write(new JsonResult(JsonStatus.loginError).ToJson());
- //}
- }
- public bool IsReusable
- {
- get
- {
- return false;
- }
- }
- }
|