Git.Storage.Web/Areas/Client/Controllers/CustomerAjaxController.cs
(开头部分) 10KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Git.Framework.Controller;
using Git.Storage.Entity.Store;
using Git.Storage.Provider.Client;
using Git.Storage.Web.Lib;
using Git.Framework.DataTypes.ExtensionMethods;
using Git.Framework.Json;
using Git.Framework.Controller.Mvc;
using Git.Storage.Provider;
using Git.Framework.Cache;
using Git.Framework.DataTypes;
using Git.Framework.ORM;
using Git.Storage.Common;
using Git.Storage.Web.Lib.Filter;
using System.Text;
using Git.Storage.Provider.Base;
namespace Git.Storage.Web.Areas.Client.Controllers
{
public class CustomerAjaxController : AjaxPage
{
/// <summary>
/// 获得客户列表
/// </summary>
/// <returns></returns>
[LoginAjaxFilter]
public ActionResult GetCustomerList()
{
int pageIndex = WebUtil.GetFormValue<int>("pageIndex", 1);
int pageSize = WebUtil.GetFormValue<int>("pageSize", 15);
string CusNum = WebUtil.GetFormValue<string>("CusNum", string.Empty);
int CusType = WebUtil.GetFormValue<int>("CusType", 0);
CustomerProvider provider = new CustomerProvider();
CustomerEntity entity = new CustomerEntity();
PageInfo pageInfo = new PageInfo() { PageIndex = pageIndex, PageSize = pageSize };
if (!CusNum.IsEmpty())
{
entity.Begin<CustomerEntity>()
.Where<CustomerEntity>("CusNum", ECondition.Like, "%" + CusNum + "%")
.Or<CustomerEntity>("CusName", ECondition.Like, "%" + CusNum + "%")
.End<CustomerEntity>();
}
if (CusType != 0)
{
entity.Where<CustomerEntity>(a => a.CusType == CusType);
}
List<CustomerEntity> listResult = provider.GetCustomerList(entity, ref pageInfo);
string json = ConvertJson.ListToJson<CustomerEntity>(listResult, "List");
this.ReturnJson.AddProperty("Data", new JsonObject(json));
this.ReturnJson.AddProperty("RowCount", pageInfo.RowCount);
return Content(this.ReturnJson.ToString());
}
/// <summary>
后面还有 221 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
