/// <summary> /// 根据类别名称查询类别信息 /// </summary> /// <param name="cateName"></param> /// <returns></returns> public ProductCategory_CE GetSingleCateName(string cateName) { if (cateName.IsEmpty()) { return(null); } ProductCategoryProvider provider = new ProductCategoryProvider(); ProductCategoryEntity entity = provider.GetSingleCateName(cateName); if (entity.IsNotNull()) { ProductCategory_CE ce = ProductCategory_To.ToCE(entity); return(ce); } return(null); }
/// <summary> /// 查询所有的货品种类 /// </summary> /// <returns></returns> public List <ProductCategory_CE> GetList() { ProductCategoryProvider provider = new ProductCategoryProvider(); List <ProductCategoryEntity> listResult = provider.GetList(); if (!listResult.IsNullOrEmpty()) { List <ProductCategory_CE> list = new List <ProductCategory_CE>(); foreach (ProductCategoryEntity item in listResult) { ProductCategory_CE ce = ProductCategory_To.ToCE(item); list.Add(ce); } return(list); } return(null); }