You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
85 lines
2.4 KiB
85 lines
2.4 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Web;
|
|
|
|
namespace FangYar.WebUI.ashx
|
|
{
|
|
/// <summary>
|
|
/// FireHandoverEquipHandler 的摘要说明
|
|
/// </summary>
|
|
public class FireHandoverEquipHandler : IHttpHandler
|
|
{
|
|
private FangYar.BLL.FIRE.FIRE_HANDOVER_EQUIP bll = new FangYar.BLL.FIRE.FIRE_HANDOVER_EQUIP();
|
|
//FangYar.BLL.TBL_CARACCESS cabll = new BLL.TBL_CARACCESS();
|
|
|
|
public void ProcessRequest(HttpContext context)
|
|
{
|
|
|
|
// 记录操作日志
|
|
BLL.SysOperationLogHelp.AddSysOperationLog(context, Common.EnumOperationLogType.Other, "FIRE_HANDOVER_EQUIP表操作请求", "");
|
|
|
|
context.Response.ContentType = "text/plain";
|
|
string action = context.Request.Params["Action"];
|
|
string returnstr = "";
|
|
switch (action)
|
|
{
|
|
case "View":
|
|
returnstr = View(context);
|
|
break;
|
|
}
|
|
context.Response.Write(returnstr);
|
|
}
|
|
|
|
private string View(HttpContext context)
|
|
{
|
|
string returnstr = "";
|
|
string msg = "";
|
|
|
|
try
|
|
{
|
|
returnstr = "{\"code\":0,\"msg\":\"\",";
|
|
|
|
string CarNum = context.Request.Params["CarNum"];//车辆id
|
|
DataTable dt = new DataTable();
|
|
dt = bll.GetHandoverInfo(CarNum).Tables[0];
|
|
|
|
if (dt != null)
|
|
{
|
|
int count = dt.Rows.Count;
|
|
returnstr += "\"count\":" + count + ",\"data\":";
|
|
if (count == 0)
|
|
{
|
|
returnstr += "[]";
|
|
}
|
|
else
|
|
{
|
|
returnstr += FangYar.Common.JsonHelper.ToJson(dt);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
msg = "查看失败!";
|
|
}
|
|
}
|
|
catch
|
|
{
|
|
msg = "添加失败!";
|
|
}
|
|
|
|
|
|
returnstr += "}";
|
|
//returnstr = "{\"msg\":\"" + msg + "\",\"data\":" + data + "}";
|
|
return returnstr;
|
|
}
|
|
|
|
public bool IsReusable
|
|
{
|
|
get
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
}
|