Ejemplo n.º 1
0
        public static void UpdateProductComment(ProductCommentInfo productComment)
        {
            ProductCommentInfo info = ReadProductComment(productComment.ID, 0);

            dal.UpdateProductComment(productComment);
            if (productComment.ProductID != info.ProductID)
            {
                ProductBLL.ChangeProductCommentCountAndRank(info.ProductID, info.Rank, ChangeAction.Minus);
                ProductBLL.ChangeProductCommentCountAndRank(productComment.ProductID, productComment.Rank, ChangeAction.Plus);
            }
        }
Ejemplo n.º 2
0
 public static int AddProductComment(ProductCommentInfo productComment)
 {
     productComment.ID = dal.AddProductComment(productComment);
     ProductBLL.ChangeProductCommentCountAndRank(productComment.ProductID, productComment.Rank, ChangeAction.Plus);
     return(productComment.ID);
 }