//发布用户对商品的收藏17 OK 住:加入收藏商品热度加1,加入购物车商品加1 public bool AddCollectItem(String UserID, Guid CommodityID) { bool IsSucceed = false; //数据访存器 DatabaseAccess.DataClasses1DataContext DBAccessor = new DataClasses1DataContext(); try { //发布收藏 DBAccessor.insertCollect(UserID,CommodityID); //商品的热度加1 DBAccessor.updatePopularityCommodity(CommodityID); IsSucceed = true; } catch(Exception e) { IsSucceed = false; } return IsSucceed; }