コード例 #1
0
        public override void OnPageLoad(object sender, EventArgs e)
        {
            facade                 = new ProductDiscussQueryFacade(this);
            filter                 = new ProductDiscussQueryFilter();
            filterReply            = new ProductDiscussReplyQueryFilter();
            model                  = new ProductDiscussQueryVM();
            modelReply             = new ProductDiscussReplyQueryVM();
            model.ChannelID        = "1";
            modelReply.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);


            CodeNamePairHelper.GetList("MKT", "ReplyStatus", CodeNamePairAppendItemType.All, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                comDiscussStatus.ItemsSource     = args.Result;
                comReplyReviewStatus.ItemsSource = args.Result;
            });
            //顾客类型
            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;
            //});


            ProductDiscussBaseInfo.DataContext = model;
            btnStackPanel.DataContext          = model;

            replySection.DataContext       = modelReply;
            btnReplyStackPanel.DataContext = modelReply;
            base.OnPageLoad(sender, e);
        }
コード例 #2
0
        private void UCEditProductDiscuss_Loaded(object sender, RoutedEventArgs e)
        {
            Loaded -= new RoutedEventHandler(UCEditProductDiscuss_Loaded);
            facade  = new ProductDiscussQueryFacade(CPApplication.Current.CurrentPage);

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

                vm = args.Result.Convert <ProductDiscussDetail, ProductDiscussQueryVM>();

                QueryResultGrid.ItemsSource = vm.ProductDiscussReplyList;

                LayoutRoot.DataContext = vm;
            });
        }