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); } }
public static int AddProductComment(ProductCommentInfo productComment) { productComment.ID = dal.AddProductComment(productComment); ProductBLL.ChangeProductCommentCountAndRank(productComment.ProductID, productComment.Rank, ChangeAction.Plus); return(productComment.ID); }