using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace VRS.Handler { /// /// 接口 :VSAT故障排除 返回故障类型taskId: 故障表 pro_fault 的 fault_code /// public class VSATFaultCode : BasePage, IHttpHandler { public override void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; bool state = false; DataService.BLL.pro_subject bll = new DataService.BLL.pro_subject(); //var subject_id = "10003"; var subject_id = ""; var code = bll.GetFaultCode(subject_id); if (!string.IsNullOrEmpty(code)) { state = true; context.Response.Write(GetJsonWithCode(APICode.Success, new { taskId = code, subject_id = subject_id })); context.Response.End(); } if (!state) { context.Response.Write(GetJsonWithCode(APICode.Fail, "")); context.Response.End(); } } public new bool IsReusable { get { return false; } } } }