Handler/BrandHandler.ashx.cs
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using GoodsProject.DAL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Bowin.Common.Linq;
using Bowin.Common.Linq.Sql;
using GoodsProject.Model;
namespace GoodsProject.Handler
{
/// <summary>
/// BrandHandler 的摘要说明
/// </summary>
public class BrandHandler : IHttpHandler
{
BrandDAL dal = new BrandDAL();
LogDAL Errordal = new LogDAL();
CommodityDBDataContext db = new CommodityDBDataContext();
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
var action = context.Request["action"];
switch (action)
{
case "list":
int count = 0;
var page = int.Parse(context.Request["page"]);
var rows = int.Parse(context.Request["rows"]);
var data = dal.GetBrandList(page, rows, out count);
string result = data.ToJson();
string returnJson = "{\"total\":" + count.ToString() + ",\"rows\":" + result + "}";
context.Response.Write(returnJson);
break;
case "sele":
context.Response.Write(GetBrandInfo(context));
break;
case "add":
context.Response.Write(AddInfo(context));
break;
case "del":
context.Response.Write(Removelist(context));
break;
default:
break;
}
}
#region 查找商品
public string GetBrandInfo(HttpContext context)
{
//System.Threading.Thread.Sleep(1000);
string ID = context.Request["ID"];
string IsShow = context.Request["IsShow"];
if (ID != null )
{
//var sList = db.TB_Brand.Where(w => w.ID == ID).ToJson();
var sql = from n in db.TB_Brand.Where(w => w.ID == ID).OrderBy(o => o.CreateDate)
select new BrandInfo
后面还有 136 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。