Exemple #1
0
        /// <summary>
        /// 更新一条商品回复数据
        /// </summary>
        /// <param name="productReply">商品回复模型变量</param>
        public static void UpdateProductReply(ProductReplyInfo productReply)
        {
            ProductReplyInfo tempProductReply = ReadProductReply(productReply.ID, 0);

            dal.UpdateProductReply(productReply);
            if (productReply.CommentID != tempProductReply.CommentID)
            {
                ProductCommentBLL.ChangeProductCommentCount(tempProductReply.CommentID, ChangeAction.Minus);
                ProductCommentBLL.ChangeProductCommentCount(productReply.CommentID, ChangeAction.Plus);
            }
        }
Exemple #2
0
 /// <summary>
 /// 删除多条商品回复数据
 /// </summary>
 /// <param name="strID">商品回复的主键值,以,号分隔</param>
 /// <param name="userID">用户ID</param>
 public static void DeleteProductReply(string strID, int userID)
 {
     ProductCommentBLL.ChangeProductCommentCountByGeneral(strID, ChangeAction.Minus);
     dal.DeleteProductReply(strID, userID);
 }
Exemple #3
0
 /// <summary>
 /// 增加一条商品回复数据
 /// </summary>
 /// <param name="productReply">商品回复模型变量</param>
 public static int AddProductReply(ProductReplyInfo productReply)
 {
     productReply.ID = dal.AddProductReply(productReply);
     ProductCommentBLL.ChangeProductCommentCount(productReply.CommentID, ChangeAction.Plus);
     return(productReply.ID);
 }