Пример #1
0
        private void UCAddProductConsult_Loaded(object sender, RoutedEventArgs e)
        {
            Loaded -= new RoutedEventHandler(UCAddProductConsult_Loaded);
            //咨询状态,就是相对应的回复状态
            CodeNamePairHelper.GetList("MKT", "ConsultCategory", (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                comConsultStatus.ItemsSource = args.Result;
            });
            facade = new ProductConsultQueryFacade(CPApplication.Current.CurrentPage);

            cbNeedAdditionalText.IsChecked = false;
            //咨询基本信息
            facade.LoadProductConsult(SysNo, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                productConsult                 = args.Result;
                vm                             = productConsult.Convert <ProductConsult, ProductConsultQueryVM>();
                BaseInfoLayout.DataContext     = vm;
                btnReplyStackPanel.DataContext = new ProductConsultReplyQueryVM();
                if (vm.ProductReviewMailLog != null)
                {
                    tbTopicMailContent.Text = vm.ProductReviewMailLog.TopicMailContent.Content;//邮件回复
                }
                vendorReplyList = vm.VendorReplyList;
                FactoryReplyList.ItemsSource        = vendorReplyList;
                ProductConsultReplyList.ItemsSource = vm.ProductConsultReplyList;
            });
        }
Пример #2
0
 /// <summary>
 /// 保存
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnSave_Click(object sender, RoutedEventArgs e)
 {
     if (string.IsNullOrEmpty(tbReplyContent.Text))
     {
         CPApplication.Current.CurrentPage.Context.Window.Alert(ResComment.Information_ConsultContentIsNotNull, Newegg.Oversea.Silverlight.Controls.Components.MessageType.Warning);
     }
     else
     {
         vm.ReplyContent = tbReplyContent.Text;
         ProductConsultReply item = vm.ConvertVM <ProductConsultQueryVM, ProductConsultReply>();
         item.NeedAdditionalText = cbNeedAdditionalText.IsChecked.Value ? YNStatus.Yes : YNStatus.No;
         item.CompanyCode        = Newegg.Oversea.Silverlight.ControlPanel.Core.CPApplication.Current.CompanyCode;
         item.ConsultSysNo       = SysNo;
         facade.UpdateProductConsultDetailReply(item, (obj, args) =>
         {
             if (args.FaultsHandle())
             {
                 return;
             }
             CPApplication.Current.CurrentPage.Context.Window.Alert(ResComment.Information_UpdateSuccessful, Newegg.Oversea.Silverlight.Controls.Components.MessageType.Information);
             facade.LoadProductConsult(SysNo, (obj2, args2) =>
             {
                 if (args2.FaultsHandle())
                 {
                     return;
                 }
                 productConsult = args2.Result;
                 vm             = productConsult.Convert <ProductConsult, ProductConsultQueryVM>();
                 ProductConsultReplyList.ItemsSource = vm.ProductConsultReplyList;
             });
             tbReplyContent.Text = "";
         });
     }
 }
Пример #3
0
        /// <summary>
        /// 编辑
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void hlEdit_Click(object sender, RoutedEventArgs e)
        {
            ProductConsultQueryVM item        = this.QueryResultGrid.SelectedItem as ProductConsultQueryVM;
            UCAddProductConsult   usercontrol = new UCAddProductConsult();

            usercontrol.SysNo  = item.SysNo.Value;
            usercontrol.Dialog = Window.ShowDialog(ResComment.Title_EditProductConsult, usercontrol, (obj, args) =>
            {
                QueryResultGrid.Bind();
            });
        }
Пример #4
0
        public override void OnPageLoad(object sender, EventArgs e)
        {
            facade                 = new ProductConsultQueryFacade(this);
            filter                 = new ProductConsultQueryFilter();
            filterReply            = new ProductConsultReplyQueryFilter();
            model                  = new ProductConsultQueryVM();
            modelReply             = new ProductConsultReplyQueryVM();
            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;

            #region 咨询
            //商品状态
            comProductStatus.ItemsSource = EnumConverter.GetKeyValuePairs <ECCentral.BizEntity.IM.ProductStatus>(EnumConverter.EnumAppendItemType.All);


            //咨询状态,就是相对应的回复状态
            CodeNamePairHelper.GetList("MKT", "ReplyStatus", CodeNamePairAppendItemType.All, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                comConsultStatus.ItemsSource      = args.Result;
                comConsultStatusReply.ItemsSource = args.Result;//.Remove(;需要删除已经回复,需要确认
            });

            //标记类型,也就是咨询的类型
            CodeNamePairHelper.GetList("MKT", "ConsultCategory", CodeNamePairAppendItemType.All, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                comConsultCategory.ItemsSource = args.Result;
            });
            //顾客类型
            CodeNamePairHelper.GetList("MKT", "CustomerCategory", CodeNamePairAppendItemType.All, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                comCustomerCategory.ItemsSource      = args.Result;
                comCustomerCategoryReply.ItemsSource = args.Result;
            });
            #endregion

            #region 回复
            comIsTopReply.ItemsSource         = EnumConverter.GetKeyValuePairs <YNStatus>(EnumConverter.EnumAppendItemType.All);
            comProductStatusReply.ItemsSource = EnumConverter.GetKeyValuePairs <ECCentral.BizEntity.IM.ProductStatus>(EnumConverter.EnumAppendItemType.All);

            comIsType.ItemsSource = EnumConverter.GetKeyValuePairs <ReplyVendor>(EnumConverter.EnumAppendItemType.All);
            #endregion

            ProductConsultLayout.DataContext = model;
            btnStackPanel.DataContext        = model;

            ProductConsultReplyLayout.DataContext = modelReply;
            btnReplyStackPanel.DataContext        = modelReply;
            base.OnPageLoad(sender, e);
        }