WebUI/Area.ashx
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<%@ WebHandler Language="C#" Class="Area" %>
using System;
using System.Web;
using System.Data.SqlClient;
using System.Data;
using BLL;
public class Area : IHttpHandler {
public void ProcessRequest (HttpContext context) {
string type = context.Request.QueryString["type"];
if (type.Equals("sheng"))
{
string id = context.Request.QueryString["id"];
context.Response.ContentType = "text/plain";
context.Response.Write(getSheng(id));//这个是从数据库中根据传来省的id 查询出来的。市的名字和主键,主键以便去查区的名字
}
else if (type.Equals("shi"))
{
string id = context.Request.QueryString["id"];
context.Response.ContentType = "text/plain";
context.Response.Write(getqu(id));
}
}
public string getqu(string shi)
{
DataSet ds = AreaBLL.getAreaInfoByCityID(shi);
string str = "";
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
if (i == ds.Tables[0].Rows.Count - 1)
{
str += ds.Tables[0].Rows[i]["code"].ToString() + "," + ds.Tables[0].Rows[i]["name"].ToString();
}
else
{
str += ds.Tables[0].Rows[i]["code"].ToString() + "," + ds.Tables[0].Rows[i]["name"].ToString() + "|";
}
}
return str.Trim();
}
public string getSheng(string sheng)
{
DataSet ds = CityBLL.getCityInfoByProvinceID(sheng);
string str = "";
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
if (i == ds.Tables[0].Rows.Count - 1)
{
str += ds.Tables[0].Rows[i]["code"].ToString() + "," + ds.Tables[0].Rows[i]["name"].ToString();
}
else
{
str += ds.Tables[0].Rows[i]["code"].ToString() + "," + ds.Tables[0].Rows[i]["name"].ToString() + "|";
}
}
return str.Trim();
}
后面还有 8 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。