Car/Ajax/GetProduct.ashx.cs
(完整代码) 1KBusing System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using Newtonsoft.Json;
using System.Web;
namespace Car.Ajax
{
/// <summary>
/// GetProduct 的摘要说明
/// </summary>
public class GetProduct : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
if (context.Request["ids"] != null)
{
if (context.Request["ids"].ToString() != "")
{
DataTable dt = DBUtility.DbHelperSQL.Query("select *,(select Title from Category where Category.InfoID = Product.CategoryID) as CategoryName from Product where Verify = 1 and InfoID in (0" + context.Request["ids"].ToString() + "0)order by InfoID desc ").Tables[0];
Hashtable ht = new Hashtable();
ht.Add("code", 0);
ht.Add("data", dt);
string str = JsonConvert.SerializeObject(ht);
context.Response.Write(str);
}
else
{
Hashtable ht = new Hashtable();
ht.Add("code", 1);
string str = JsonConvert.SerializeObject(ht);
context.Response.Write(str);
}
}
else
{
Hashtable ht = new Hashtable();
ht.Add("code", 1);
string str = JsonConvert.SerializeObject(ht);
context.Response.Write(str);
}
}
public bool IsReusable
{
get
{
return false;
}
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。