예제 #1
0
        public ActionResult <object> GetProductPageList([FromQuery] CrmProductScrewSearch search, int pageIndex = 1, int pageSize = 10)
        {
            var totalCount = 0;
            var data       = _repository.GetProductScrewPageList(search, ref totalCount, pageIndex, pageSize);

            return(data.ResponseSuccess("", totalCount));
        }
예제 #2
0
 public IList <CrmProductScrewEntity> FindProductScrewPageList(CrmProductScrewSearch search, ref int totalCount, int pageIndex, int pageSize)
 {
     return(GetInstance().Queryable <CrmProductScrewEntity>()
            .WhereIF(search.ProductType != null, t => t.ProductType == search.ProductType)
            .WhereIF(search.ProductNameType > -1, t => t.ProductNameType == search.ProductNameType)
            .WhereIF(search.Exterior != null, t => t.Exterior == search.Exterior)
            .WhereIF(search.Material != null, t => t.Material == search.Material)
            .WhereIF(!search.Specification.IsNullOrWhiteSpace(), t => t.Specification.Contains(search.Specification.Trim()))
            .OrderBy(t => t.ProductId, OrderByType.Desc)
            .ToPageList(pageIndex, pageSize, ref totalCount));
 }
예제 #3
0
 /// <summary>
 /// 查询商品信息
 /// </summary>
 /// <param name="search"></param>
 /// <param name="totalCount"></param>
 /// <param name="pageIndex"></param>
 /// <param name="pageSize"></param>
 /// <returns></returns>
 public IList <CrmProductScrewEntity> GetProductScrewPageList(CrmProductScrewSearch search, ref int totalCount, int pageIndex = 1, int pageSize = 10)
 {
     return(_service.FindProductScrewPageList(search, ref totalCount, pageIndex, pageSize));
 }