/// <summary>
 /// 更新指定分类的有效商品数量
 /// </summary>
 /// <param name="goodscategoryinfo">指定分类的信息</param>
 /// <returns>更新商品分类数</returns>
 public static bool UpdateCategoryGoodsCount(Goodscategoryinfo goodsCategoryInfo)
 {
     if (goodsCategoryInfo != null && goodsCategoryInfo.Categoryid > 0)
     {
         goodsCategoryInfo.Goodscount = Goods.GetGoodsCount(goodsCategoryInfo.Categoryid, "");
         GoodsCategories.UpdateGoodsCategory(goodsCategoryInfo);
         return(true);
     }
     return(false);
 }
 /// <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);
 }
Beispiel #3
0
 /// <summary>
 /// 生成商品分类的json文件
 /// </summary>
 public override void StaticWriteJsonFile()
 {
     GoodsCategories.StaticWriteJsonFile();
 }
Beispiel #4
0
 /// <summary>
 /// 清除商品分类绑定的版块
 /// </summary>
 /// <param name="fid"></param>
 public override void EmptyGoodsCategoryFid(int fid)
 {
     GoodsCategories.EmptyGoodsCategoryFid(fid);
 }
Beispiel #5
0
 /// <summary>
 /// 获取指定分类的fid(版块id)字段信息
 /// </summary>
 /// <param name="categoryid">指定的分类id</param>
 /// <returns>(fid)版块id</returns>
 public override int GetCategoriesFid(int categoryId)
 {
     return(GoodsCategories.GetCategoriesFid(categoryId));
 }
Beispiel #6
0
 /// <summary>
 /// 通过指定的论坛版块id获取相应的商品分类
 /// </summary>
 /// <param name="forumid">版块id</param>
 /// <returns></returns>
 public override int GetGoodsCategoryIdByFid(int forumId)
 {
     return(GoodsCategories.GetGoodsCategoryIdByFid(forumId));
 }
Beispiel #7
0
 /// <summary>
 /// 获取绑定版块的商品分类
 /// </summary>
 /// <returns></returns>
 public override string GetGoodsCategoryWithFid()
 {
     return(GoodsCategories.GetGoodsCategoryWithFid());
 }