Ejemplo n.º 1
0
        /// <summary>
        /// 添加产品评论回复:添加产品评论回复有3种方式:
        ///1.	网友回复,需通过审核才展示。
        ///2.	厂商回复(通过Seller Portal),需通过审核才展示。
        ///3.	IPP系统中回复,默认直接展示。
        /// </summary>
        public void AddProductReviewReply(ProductReviewReply item)
        {
            DataCommand dc = DataCommandManager.GetDataCommand("ProductReview_CreateProductReviewReply");

            dc.SetParameterValue <ProductReviewReply>(item);
            dc.ExecuteNonQuery();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 批准发布
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnApproveRelease_Click(object sender, RoutedEventArgs e)
        {
            if (selectVendorReplyItem == null)
            {
                CPApplication.Current.CurrentPage.Context.Window.Alert(ResComment.Information_MoreThanOneRecord, Newegg.Oversea.Silverlight.Controls.Components.MessageType.Warning);
            }
            else if (selectVendorReplyItem.StatusValue != "O")//与显示操作的条件一致
            {
                CPApplication.Current.CurrentPage.Context.Window.Alert(ResComment.Information_CannotOperateRecord, Newegg.Oversea.Silverlight.Controls.Components.MessageType.Warning);
            }
            else
            {
                //ProductReviewReply item = this.VendorProductReviewReply.SelectedItem as ProductReviewReply;

                selectVendorReplyItem.Status      = "A";
                selectVendorReplyItem.ReviewSysNo = SysNo;
                //item.SysNo = 0;//该条的sysno

                facade.UpdateProductReviewVendorReplyStatus(selectVendorReplyItem, (obj, args) =>
                {
                    if (args.FaultsHandle())
                    {
                        return;
                    }
                    selectVendorReplyItem = null;

                    CPApplication.Current.CurrentPage.Context.Window.Alert(ResComment.Information_OperateSuccessful, Newegg.Oversea.Silverlight.Controls.Components.MessageType.Information);
                });
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 厂商回复的批量发布与拒绝
        /// </summary>
        /// <param name="item"></param>
        /// <returns></returns>
        public int UpdateProductReviewVendorReplyStatus(ProductReviewReply item)
        {
            DataCommand dc = DataCommandManager.GetDataCommand("ProductReview_UpdateVendorStatus");

            //dc.SetParameterValue<ProductReviewReply>(item);
            dc.SetParameterValue("@SysNo", item.SysNo.Value);
            dc.SetParameterValue("@ReviewSysNo", item.ReviewSysNo.Value);
            dc.SetParameterValue("@Content", item.Content);
            dc.SetParameterValue("@Status", item.Status);
            dc.SetParameterValue("@CompanyCode", item.CompanyCode);
            dc.SetParameterValueAsCurrentUserAcct("EditUser");
            dc.ExecuteNonQuery();
            return(Convert.ToInt32(dc.GetParameterValue("@IsSuccess")));
        }
Ejemplo n.º 4
0
        /// <summary>
        /// grid中拒绝
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void hlReject_Click(object sender, RoutedEventArgs e)
        {
            ProductReviewReply item = this.VendorProductReviewReply.SelectedItem as ProductReviewReply;

            item.Content     = ResComment.Content_Reject;
            item.Status      = "D";
            item.ReviewSysNo = SysNo;
            //item.SysNo=0;//该条的sysno

            facade.UpdateProductReviewVendorReplyStatus(item, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                CPApplication.Current.CurrentPage.Context.Window.Alert(ResComment.Information_OperateSuccessful, Newegg.Oversea.Silverlight.Controls.Components.MessageType.Information);
            });
        }
Ejemplo n.º 5
0
        public JsonResult ReplyToCustomerProduct(ProductReviewReply x)
        {
            int AdminId = (int)Session["AdminId"];

            string name = db.Admin.FirstOrDefault(c => c.Id == AdminId).FullName;

            ProductReviewReply xdb = new ProductReviewReply();


            xdb.Content         = x.Content;
            xdb.PostedDate      = DateTime.Now;
            xdb.AdminId         = AdminId;
            xdb.ReviewProductId = x.ReviewProductId;

            db.ProductReviewReplies.Add(xdb);

            db.SaveChanges();


            return(Json(new { xdb, name }, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 厂商回复的批量发布与拒绝
        /// </summary>
        /// <param name="item"></param>
        public virtual void UpdateProductReviewVendorReplyStatus(ProductReviewReply item)
        {
            TransactionScopeFactory.TransactionAction(() =>
            {
                int x = productReviewDA.UpdateProductReviewVendorReplyStatus(item);

                switch (item.Status)
                {
                //发布
                case "A":
                    EventPublisher.Publish <ProductReviewReplyAuditMessage>(new ProductReviewReplyAuditMessage
                    {
                        SysNo            = item.SysNo.Value,
                        CurrentUserSysNo = ServiceContext.Current.UserSysNo
                    });
                    break;

                //拒绝
                case "D":
                    EventPublisher.Publish <ProductReviewReplyVoidMessage>(new ProductReviewReplyVoidMessage
                    {
                        SysNo            = item.SysNo.Value,
                        CurrentUserSysNo = ServiceContext.Current.UserSysNo
                    });
                    break;
                }


                if (x == 1001)
                {
                    throw new BizException(ResouceManager.GetMessageString("MKT.Comment", "Comment_VendorWithdrawData"));
                }
                else if (x == 1002)
                {
                    throw new BizException(ResouceManager.GetMessageString("MKT.Comment", "Comment_SubmitFailed"));
                }
            });
        }
Ejemplo n.º 7
0
        /// <summary>
        ///  添加回复:
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnAddReply_Click(object sender, RoutedEventArgs e)
        {
            if (string.IsNullOrEmpty(addReplyContent.Text))
            {
                CPApplication.Current.CurrentPage.Context.Window.Alert(ResComment.Information_ReplyContentIsNotNull, Newegg.Oversea.Silverlight.Controls.Components.MessageType.Warning);
            }

            else
            {
                ProductReviewReply item = new ProductReviewReply();
                item.Content            = addReplyContent.Text;
                item.NeedAdditionalText = cbNeedAdditionalText.IsChecked.Value ? YNStatus.Yes : YNStatus.No;
                item.CustomerSysNo      = int.Parse(vm.CustomerSysNo);
                item.CompanyCode        = Newegg.Oversea.Silverlight.ControlPanel.Core.CPApplication.Current.CompanyCode;
                item.ReviewSysNo        = SysNo;
                item.Status             = "A";
                item.Type = "N";//泰隆优选特有
                facade.AddProductReviewReply(item, (obj, args) =>
                {
                    if (args.FaultsHandle())
                    {
                        return;
                    }
                    CPApplication.Current.CurrentPage.Context.Window.Alert(ResComment.Information_OperateSuccessful, Newegg.Oversea.Silverlight.Controls.Components.MessageType.Information);
                    facade.LoadProductReview(SysNo, (s2, args2) =>
                    {
                        if (args2.FaultsHandle())
                        {
                            return;
                        }

                        vm = args2.Result.Convert <ProductReview, ProductReviewQueryVM>();
                        ProductReviewReplyList.ItemsSource = vm.ProductReviewReplyList;
                    });
                });
            }
        }
Ejemplo n.º 8
0
 /// <summary>
 /// 选中厂商回复
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void VendorProductReviewReply_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     selectVendorReplyItem = this.VendorProductReviewReply.SelectedItem as ProductReviewReply;
     //tbVendorReply.Text = selectVendorReplyItem.Content;
 }
Ejemplo n.º 9
0
        /// <summary>
        /// 厂商回复的批量发布与拒绝
        /// </summary>
        /// <param name="item"></param>
        /// <param name="callback"></param>
        public void UpdateProductReviewVendorReplyStatus(ProductReviewReply item, EventHandler <RestClientEventArgs <dynamic> > callback)
        {
            string relativeUrl = "/MKTService/CommentInfo/UpdateProductReviewVendorReplyStatus";

            restClient.Update(relativeUrl, item, callback);
        }
Ejemplo n.º 10
0
        /// <summary>
        /// 添加产品评论回复
        /// </summary>
        /// <param name="item"></param>
        /// <param name="callback"></param>
        public void AddProductReviewReply(ProductReviewReply item, EventHandler <RestClientEventArgs <dynamic> > callback)
        {
            string relativeUrl = "/MKTService/CommentInfo/AddProductReviewReply";

            restClient.Create(relativeUrl, item, callback);
        }
Ejemplo n.º 11
0
 public virtual void AddProductReviewReply(ProductReviewReply item)
 {
     productReviewAppService.AddProductReviewReply(item);
 }
Ejemplo n.º 12
0
 public virtual void UpdateProductReviewVendorReplyStatus(ProductReviewReply item)
 {
     productReviewAppService.UpdateProductReviewVendorReplyStatus(item);
 }
Ejemplo n.º 13
0
 /// <summary>
 /// 厂商回复的批量发布与拒绝
 /// </summary>
 /// <param name="item"></param>
 public virtual void UpdateProductReviewVendorReplyStatus(ProductReviewReply item)
 {
     ObjectFactory <ProductReviewProcessor> .Instance.UpdateProductReviewVendorReplyStatus(item);
 }
Ejemplo n.º 14
0
 /// <summary>
 /// 添加产品评论回复:添加产品评论回复有3种方式:
 ///1.	网友回复,需通过审核才展示。
 ///2.	厂商回复(通过Seller Portal),需通过审核才展示。
 ///3.	IPP系统中回复,默认直接展示。
 /// </summary>
 public virtual void AddProductReviewReply(ProductReviewReply item)
 {
     ObjectFactory <ProductReviewProcessor> .Instance.AddProductReviewReply(item);
 }
Ejemplo n.º 15
0
 /// <summary>
 /// 添加产品评论回复:添加产品评论回复有3种方式:
 ///1.	网友回复,需通过审核才展示。
 ///2.	厂商回复(通过Seller Portal),需通过审核才展示。
 ///3.	IPP系统中回复,默认直接展示。
 /// </summary>
 public virtual void AddProductReviewReply(ProductReviewReply item)
 {
     productReviewDA.AddProductReviewReply(item);
 }