예제 #1
0
 /// <summary>
 /// 更新分类的有效商品数量
 /// </summary>
 /// <returns>更新商品分类数</returns>
 public static bool UpdateCategoryGoodsCount()
 {
     Goodscategoryinfo[] goodsArray = DTO.GetGoodsCategoryInfoArray(GoodsCategories.GetCategoriesTable());
     if (goodsArray == null)
     {
         return(true);
     }
     foreach (Goodscategoryinfo goodsCategoryInfo in goodsArray)
     {
         if (goodsCategoryInfo != null && goodsCategoryInfo.Categoryid > 0)
         {
             goodsCategoryInfo.Goodscount = Goods.GetGoodsCount(goodsCategoryInfo.Categoryid, "");
             GoodsCategories.UpdateGoodsCategory(goodsCategoryInfo);
         }
     }
     return(true);
 }
예제 #2
0
 /// <summary>
 /// 获取(根)商品分类信息
 /// </summary>
 /// <returns></returns>
 public static Goodscategoryinfo[] GetShopRootCategory()
 {
     return(DTO.GetGoodsCategoryInfoArray(DbProvider.GetInstance().GetRootCategoriesTable()));
 }