| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <%@ WebHandler Language="C#" Class="getUser" %>
- using System;
- using System.Web;
- using System.Web.SessionState;
- using System.Data;
- using System.Text;
- using System.Collections;
- using System.Collections.Generic;
- using Newtonsoft.Json;
- using Newtonsoft.Json.Linq;
- using Curtain.DataAccess;
- using DK.XuWei.WebMes;
- public class getUser : IHttpHandler, IReadOnlySessionState
- {
- public void ProcessRequest(HttpContext context)
- {
- context.Response.ContentType = "text/plain";
- using(IDataAccess conn = DataAccess.Create())
- {
- DataTable dt = conn.ExecuteDatatable(@"
- SELECT
- USERID AS ID,
- USERCODE AS CODE,
- USERNAME AS NAME
- FROM
- TP_MST_USER
- WHERE
- VALUEFLAG = '1'
- ORDER BY
- USERCODE
- ");
- context.Response.Write(dt.ToJson());
- }
- }
- public bool IsReusable
- {
- get
- {
- return false;
- }
- }
- }
|