using System;
|
using System.Collections.Generic;
|
using System.Data;
|
using System.Linq;
|
using System.Reflection;
|
using System.Web;
|
using Terra.YaoGan.Common;
|
using Terra.YaoGan.Service;
|
|
namespace Terra.YaoGan.Web.Ashx
|
{
|
/// <summary>
|
/// DLDZ 的摘要说明
|
/// </summary>
|
public class DLDZ : IHttpHandler
|
{
|
|
public void ProcessRequest(HttpContext context)
|
{
|
string Action = context.Request["Action"];
|
|
MethodInfo mif = this.GetType().GetMethod(Action);
|
if (mif != null)
|
{
|
mif.Invoke(this, new object[] { context });
|
}
|
|
}
|
|
//获取选中的路径
|
public void DataDLDZ(HttpContext context)
|
{
|
string where = context.Request["Year"];
|
string sql =string.Format(@"SELECT YJ.*,CD.Name from ( SELECT YJFL,COUNT(YJFL) Number FROM DLDZ where [Year]={0} GROUP BY YJFL) YJ LEFT JOIN ColorDestory CD
|
ON YJ.YJFL = CD.Code ORDER BY YJFL",where);
|
GetTableCommon gt = new GetTableCommon();
|
DataTable dt = gt.GetTable(sql);
|
string jsonStr = DataTableToJson.DtToJson(dt);
|
context.Response.Write(jsonStr);
|
|
}
|
|
public bool IsReusable
|
{
|
get
|
{
|
return false;
|
}
|
}
|
}
|
}
|