软测单独项目
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.
 
 
 
 
 
 

59 lines
1.6 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace FangYar.WebUI.ashx
{
/// <summary>
/// ZYFireResource 的摘要说明
/// </summary>
public class FireResource : IHttpHandler
{
#region 变量
FangYar.BLL.FIRE.FIRERESOURCE bll = new BLL.FIRE.FIRERESOURCE();
#endregion
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
string action = context.Request.Params["Action"];
string returnstr = "";
switch (action)
{
case "GetWaterResource":
returnstr = GetWaterResource(context);
break;
}
context.Response.Write(returnstr);
}
//获取消防资源
private string GetWaterResource(HttpContext context)
{
string strReturn = string.Empty;
string OrgId = context.Request.Params["OrgId"];
List<FangYar.Model.FIRE.FIRE_RESOURCES> lisResources = new List<Model.FIRE.FIRE_RESOURCES>();
lisResources = bll.GetModelList(" 1=1 and org_id in (select o.org_id from fire_org o,(select get_Org_child_list('" + OrgId + "') cids ) s where find_in_set(org_id,cids) )");
if (lisResources != null && lisResources.Count > 0)
{
strReturn += FangYar.Common.JsonHelper.ToJson(lisResources);
}
return strReturn;
}
public bool IsReusable
{
get
{
return false;
}
}
}
}