using System;
|
using System.Collections.Generic;
|
using System.Reflection;
|
using System.Web;
|
using Terra.YaoGan.Service;
|
using Terra.YaoGan.Common;
|
using System.Data;
|
|
namespace Terra.YaoGan.Web.Ashx
|
{
|
/// <summary>
|
/// Third 的摘要说明
|
/// </summary>
|
public class Third : 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});
|
}
|
|
|
|
//context.Response.ContentType = "text/plain";
|
//context.Response.Write("Hello World");
|
}
|
|
|
//获取三级目录
|
public void GetThird(HttpContext context)
|
{
|
string where = context.Request["id"];
|
GetTableBySql gt = new GetTableBySql();
|
DataTable dt=gt.GetSecondAndThirdCount(where);
|
if (dt.Rows.Count == 0)
|
{
|
context.Response.Write("number");
|
}else
|
{
|
context.Response.Write("numbers");
|
}
|
}
|
|
|
|
public void GetThirdData(HttpContext context)
|
{
|
string where = context.Request["id"];
|
GetTableBySql gt = new GetTableBySql();
|
DataTable dt = gt.GetSecondAndThirdTable(where);
|
context.Response.Write(DataTableToJson.DtToJson(dt));
|
|
}
|
|
|
|
|
|
public bool IsReusable
|
{
|
get
|
{
|
return false;
|
}
|
}
|
}
|
}
|