Exemplo n.º 1
0
 /// <summary>
 /// 添加供应商
 /// </summary>
 /// <param name="entity"></param>
 /// <returns></returns>
 public int AddSupplier(SupplierEntity entity)
 {
     entity.IsDelete = (int)EIsDelete.NotDelete;
     entity.CreateTime = DateTime.Now;
     entity.CreateUser = "";
     entity.IncludeAll();
     int line = this.Supplier.Add(entity);
     if (line > 0)
     {
         CacheHelper.Remove(CacheKey.JOOSHOW_SUPPLIER_CACHE);
     }
     return line;
 }
Exemplo n.º 2
0
 /// <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;
 }
Exemplo n.º 3
0
 /// <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;
 }