using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.Sql;
using System.Data.SqlClient;
using DTcms.Common;
using NetWing.Common.Data.SQLServer;
namespace DTcms.Web.api.region
{
/// <summary>
/// region_search 的摘要说明
/// </summary>
public class region_search : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
//context.Response.Write("Hello World");
if (context.Request["type"]=="searcharea")
{
if (!string.IsNullOrEmpty(context.Request["keyword"]))
{
DataTable dt = SqlEasy.ExecuteDataTable("select * from nw_region where MergerName like '%"+context.Request["keyword"]+"%' or [name] like '%"+context.Request["keyword"]+ "%' or Pinyin like '%"+context.Request["keyword"]+"%'");
string json=JsonHelper.DataTableToJSON(dt);
context.Response.Write(json);
}
else
{
}
}
}
public bool IsReusable
{
get
{
return false;
}
}
}
}
Copyright © 2004-2024 Ynicp.com 版权所有 法律顾问:建纬(昆明)律师事务所 昆明市网翼通科技有限公司 滇ICP备08002592号-4