/// <summary> /// 获得所有供应商信息 /// </summary> /// <param name="entity"></param> /// <param name="pageInfo"></param> /// <returns></returns> public List<SupplierEntity> GetList() { //List<SupplierEntity> listResult = CacheHelper.Get(CacheKey.JOOSHOW_SUPPLIER_CACHE) as List<SupplierEntity>; //if (!listResult.IsNullOrEmpty()) //{ // return listResult; //} SupplierEntity entity = new SupplierEntity(); entity.IncludeAll(); entity.OrderBy(a => a.ID, EOrderBy.DESC); entity.Where(a => a.IsDelete == (int)EIsDelete.NotDelete); List<SupplierEntity> listResult = this.Supplier.GetList(entity); //if (!listResult.IsNullOrEmpty()) //{ // CacheHelper.Insert(CacheKey.JOOSHOW_SUPPLIER_CACHE, listResult); //} return listResult; }
/// <summary> /// 获得所有供应商信息 /// </summary> /// <param name="entity"></param> /// <param name="pageInfo"></param> /// <returns></returns> public List<SupplierEntity> GetList(SupplierEntity entity, ref PageInfo pageInfo) { entity.IncludeAll(); entity.OrderBy(a => a.ID, EOrderBy.DESC); entity.Where(a => a.IsDelete == (int)EIsDelete.NotDelete); int rowCount = 0; List<SupplierEntity> listResult = this.Supplier.GetList(entity,pageInfo.PageSize,pageInfo.PageIndex,out rowCount); pageInfo.RowCount = rowCount; return listResult; }