gyhlw_dotnet/网站项目/VRS/Handler/VSATFaultCode.ashx.cs

43 lines
1.2 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace VRS.Handler
{
/// <summary>
/// 接口 VSAT故障排除 返回故障类型taskId: 故障表 pro_fault 的 fault_code
/// </summary>
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;
}
}
}
}