Git.Storage.Web/Areas/Product/Controllers/GoodsAjaxController.cs
(开头部分) 20KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using Git.Framework.Controller;
using Git.Storage.Entity.Store;
using Git.Storage.Provider.Store;
using Git.Storage.Web.Lib;
using Git.Framework.DataTypes;
using Git.Framework.DataTypes.ExtensionMethods;
using Git.Framework.ORM;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Git.Framework.Json;
using Git.Storage.Provider;
using Git.Storage.Common;
using System.Text;
using Git.Framework.Controller.Mvc;
using Git.Storage.Common.Excel;
using System.Data;
using Storage.Common;
using Git.Storage.Web.Lib.Filter;
using Git.Storage.Entity.Order;
using Git.Storage.Provider.Order;
using Git.Framework.Cache;
using Git.Storage.Provider.Base;
namespace Git.Storage.Web.Areas.Product.Controllers
{
public class GoodsAjaxController : AjaxPage
{
/// <summary>
/// 查询产品类别分页
/// </summary>
/// <returns></returns>
[LoginAjaxFilter]
public ActionResult CateList()
{
string cateName = WebUtil.GetFormValue<string>("cateName", string.Empty);
int pageIndex = WebUtil.GetFormValue<int>("pageIndex", 0);
int pageSize = WebUtil.GetFormValue<int>("pageSize", 0);
ProductCategoryProvider provider = new ProductCategoryProvider();
ProductCategoryEntity entity = new ProductCategoryEntity();
if (!cateName.IsEmpty())
{
entity.Begin<ProductCategoryEntity>()
.Where<ProductCategoryEntity>("CateNum", ECondition.Like, "%" + cateName + "%")
.Or<ProductCategoryEntity>("CateName", ECondition.Like, "%" + cateName + "%")
.End<ProductCategoryEntity>()
;
}
PageInfo pageInfo = new PageInfo() { PageIndex = pageIndex, PageSize = pageSize };
List<ProductCategoryEntity> list = provider.GetList(entity, ref pageInfo);
list = list.IsNull() ? new List<ProductCategoryEntity>() : list;
string json = ConvertJson.ListToJson<ProductCategoryEntity>(list, "data");
JsonObject jsonObject = new JsonObject(json);
this.ReturnJson.AddProperty("list", jsonObject);
this.ReturnJson.AddProperty("RowCount", pageInfo.RowCount);
return Content(this.ReturnJson.ToString());
}
后面还有 442 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
