Ejemplo n.º 1
0
        public void InitProductReivewDate()
        {
            if (ComplainSysNo > 0)
            {
                btnViewCSHandle.Visibility = System.Windows.Visibility.Visible;
            }
            else
            {
                btnCSHandle.Visibility = System.Windows.Visibility.Visible;
            }

            facade.LoadProductReview(SysNo, (s, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }

                vm = args.Result.Convert <ProductReview, ProductReviewQueryVM>();
                //vm = DynamicConverter<ProductDiscussQueryVM>.ConvertToVMList<List<ProductDiscussQueryVM>>(args.Result);
                //ProductDiscussReplyList.ItemsSource = vm;

                ProductReviewReplyList.ItemsSource   = vm.ProductReviewReplyList;
                VendorProductReviewReply.ItemsSource = vm.VendorReplyList;
                if (vm.ProductReviewMailLog != null)
                {
                    tbMailLog.Text = vm.ProductReviewMailLog.TopicMailContent != null ? vm.ProductReviewMailLog.TopicMailContent.Content : "";
                    tbCSNote.Text  = vm.ProductReviewMailLog.CSNote != null ? vm.ProductReviewMailLog.CSNote.Content : "";
                }
                LayoutRoot.DataContext = vm;

                if (!string.IsNullOrEmpty(vm.ImageUrl))
                {
                    //string reviewMaintainImageUrl = ReviewMaintainImageUrl;
                    ImageVM       = new List <CommentImageVM>();
                    string[] list = vm.ImageUrl.Split('|');
                    foreach (string url in list)
                    {
                        ImageVM.Add(new CommentImageVM()
                        {
                            ImageUrl = ReviewMaintainImageUrl + url, IsChecked = false
                        });
                    }
                    ProductReivewImagesList.ItemsSource = ImageVM;

                    ProductReivewImagesList.Visibility = System.Windows.Visibility.Visible;
                    btnBatchDeleteImage.Visibility     = System.Windows.Visibility.Visible;

                    ProductReivewImagesList.Bind();
                }
                else
                {
                    ProductReivewImagesList.Visibility = System.Windows.Visibility.Collapsed;
                    btnBatchDeleteImage.Visibility     = System.Windows.Visibility.Collapsed;
                }
            });
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 厂商回复
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void hlVendorReply_Click(object sender, RoutedEventArgs e)
        {
            ProductReviewQueryVM item        = this.QueryResultGrid.SelectedItem as ProductReviewQueryVM;
            UCEditProductReview  usercontrol = new UCEditProductReview();

            usercontrol.SysNo         = item.SysNo.Value;
            usercontrol.ReplyMode     = 3;
            usercontrol.ComplainSysNo = item.ComplainSysNo.HasValue ? item.ComplainSysNo.Value : 0;
            usercontrol.Dialog        = Window.ShowDialog(ResComment.Title_VendorReply, usercontrol, (obj, args) =>
            {
                QueryResultGrid.Bind();
            });
        }
Ejemplo n.º 3
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.º 4
0
        public override void OnPageLoad(object sender, EventArgs e)
        {
            facade                 = new ProductReviewQueryFacade(this);
            filter                 = new ProductReviewQueryFilter();
            filterReply            = new ProductReviewReplyQueryFilter();
            model                  = new ProductReviewQueryVM();
            modelReply             = new ProductReviewReplyQueryVM();
            modelReply.ChannelID   = "1";
            model.ChannelID        = "1";
            model.CompanyCode      = Newegg.Oversea.Silverlight.ControlPanel.Core.CPApplication.Current.CompanyCode;
            modelReply.CompanyCode = Newegg.Oversea.Silverlight.ControlPanel.Core.CPApplication.Current.CompanyCode;
            //商品状态
            comProductStatus.ItemsSource      = EnumConverter.GetKeyValuePairs <ECCentral.BizEntity.IM.ProductStatus>(EnumConverter.EnumAppendItemType.All);
            comReplyProductStatus.ItemsSource = EnumConverter.GetKeyValuePairs <ECCentral.BizEntity.IM.ProductStatus>(EnumConverter.EnumAppendItemType.All);

            List <KeyValuePair <YNStatus?, string> > ynSource = EnumConverter.GetKeyValuePairs <YNStatus>(EnumConverter.EnumAppendItemType.All);

            //List<KeyValuePair<NYNStatus?, string>> nynSource = EnumConverter.GetKeyValuePairs<NYNStatus>(EnumConverter.EnumAppendItemType.All);
            //首页热评
            comIndexHotReview.ItemsSource = ynSource;
            //首页服务热评
            comIndexServiceHotReview.ItemsSource = ynSource;
            //是否精华
            comEssence.ItemsSource = ynSource;
            //是否置顶
            comIsTop.ItemsSource = ynSource;
            //置底
            comIsBottom.ItemsSource = ynSource;
            //是否有用候选
            comUseful.ItemsSource = ynSource;
            //是否有用候选
            comIsCandidate.ItemsSource = ynSource;
            //CS处理状态,
            comCSProcessStatus.ItemsSource = EnumConverter.GetKeyValuePairs <ReviewProcessStatus>(EnumConverter.EnumAppendItemType.All);
            //评论状态,就是相对应的回复状态
            CodeNamePairHelper.GetList("MKT", "ReplyStatus", CodeNamePairAppendItemType.All, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                comReviewStatus.ItemsSource      = args.Result;
                comReplyReviewStatus.ItemsSource = args.Result;
            });
            CodeNamePairHelper.GetList("MKT", "Scores", (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                comScores.ItemsSource   = args.Result;
                comScores.SelectedIndex = 0;
            });
            //顾客类型
            CodeNamePairHelper.GetList("MKT", "CustomerCategory", CodeNamePairAppendItemType.All, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                comCustomerCategory.ItemsSource      = args.Result;
                comReplyCustomerCategory.ItemsSource = args.Result;
            });

            //回复类型
            CodeNamePairHelper.GetList("MKT", "ReplySource", CodeNamePairAppendItemType.All, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                comReplyStatus.ItemsSource = args.Result;
            });

            //评论类型 普通/晒单
            List <KeyValuePair <ReviewType?, string> > reviewOperate = EnumConverter.GetKeyValuePairs <ReviewType>(EnumConverter.EnumAppendItemType.All);

            comReviewType.ItemsSource = reviewOperate;

            List <CodeNamePair> operate = new List <CodeNamePair>();

            operate.Add(new CodeNamePair()
            {
                Code = "0", Name = ResComment.Option_ALL
            });
            operate.Add(new CodeNamePair()
            {
                Code = ">", Name = ">"
            });
            operate.Add(new CodeNamePair()
            {
                Code = ">=", Name = ">="
            });
            operate.Add(new CodeNamePair()
            {
                Code = "=", Name = "="
            });
            operate.Add(new CodeNamePair()
            {
                Code = "<", Name = "<"
            });
            operate.Add(new CodeNamePair()
            {
                Code = "<=", Name = "<="
            });
            comOperation.ItemsSource = operate;

            productReviewBaseInfo.DataContext = model;
            btnStackPanel.DataContext         = model;
            productReviewReply.DataContext    = modelReply;
            btnReplyStackPanel.DataContext    = modelReply;

            SearchResult.DataContext  = model;
            SearchResult2.DataContext = modelReply;
            base.OnPageLoad(sender, e);
            comOperation.SelectedIndex = 0;
        }