| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <%@ WebHandler Language="C#" Class="GetUserJobs" %>
- using System.Web;
- using System.Data;
- using System.Web.SessionState;
- using System.Web.Configuration;
- using Newtonsoft.Json.Linq;
- using Curtain.DataAccess;
- using Curtain.Log;
- using DK.XuWei.WebMes;
- /// <summary>
- /// 获取当前配置的工号工种
- /// </summary>
- public class GetUserJobs : IHttpHandler, IReadOnlySessionState
- {
- public void ProcessRequest(HttpContext context)
- {
- using (IDataAccess conn = DataAccess.Create())
- {
- DataTable dt = conn.ExecuteDatatable(@"
- SELECT
- J.JOBSID,
- J.JOBSNAME
- FROM
- TP_MST_USERJOBS UJ
- LEFT JOIN TP_MST_USER U ON U.USERID = UJ.USERID
- LEFT JOIN TP_MST_JOBS J ON UJ.JOBSID = J.JOBSID
- WHERE
- U.USERCODE = @USERCODE@
- ",
- new CDAParameter("USERCODE", context.Request["UserCode"])
- );
- context.Response.Write(new JsonResult(dt).ToJson());
- }
- }
- public bool IsReusable
- {
- get
- {
- return false;
- }
- }
- }
|