コード例 #1
0
        private void UCEditProductReview_Loaded(object sender, RoutedEventArgs e)
        {
            Loaded -= new RoutedEventHandler(UCEditProductReview_Loaded);
            facade  = new ProductReviewQueryFacade(CPApplication.Current.CurrentPage);
            switch (ReplyMode)
            {
            case 1:
                AddReply.Visibility            = Visibility.Visible;
                cbNeedAdditionalText.IsChecked = false;
                break;

            case 2:
                CustomerMailReply.Visibility = Visibility.Visible;
                break;

            case 3:
                ManufacturerReply.Visibility = Visibility.Visible;
                break;

            case 4:
                AddReply.Visibility          = Visibility.Visible;
                CustomerMailReply.Visibility = Visibility.Visible;
                ManufacturerReply.Visibility = Visibility.Visible;
                break;
            }
            cbNeedAdditionalText.IsChecked = false;
            InitProductReivewDate();
            AddProductReviewReply.DataContext = vmReply;
        }
コード例 #2
0
 void _Loaded(object sender, RoutedEventArgs e)
 {
     this.Loaded     -= _Loaded;
     this.DataContext = newVM;
     serviceFacade    = new ProductReviewQueryFacade(CPApplication.Current.CurrentPage);
 }
コード例 #3
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;
        }