Exemplo n.º 1
0
        private void UCAddSegmentQuery_Loaded(object sender, RoutedEventArgs e)
        {
            Loaded -= new RoutedEventHandler(UCAddSegmentQuery_Loaded);
            facade  = new SegmentQueryFacade(CPApplication.Current.CurrentPage);
            if (SysNo > 0)
            {
                isAdd = false;
                facade.LoadSegmentInfo(SysNo, (obj, args) =>
                {
                    if (args.FaultsHandle())
                    {
                        return;
                    }

                    vm                     = args.Result.Convert <SegmentInfo, SegmentQueryVM>();
                    vm.ChannelID           = "1";
                    LayoutRoot.DataContext = vm;
                });
            }
            else
            {
                vm                     = new SegmentQueryVM();
                vm.ChannelID           = "1";
                LayoutRoot.DataContext = vm;
            }
        }
Exemplo n.º 2
0
 public override void OnPageLoad(object sender, EventArgs e)
 {
     facade = new SegmentQueryFacade(this);
     model  = new SegmentQueryVM();
     filter = new SegmentQueryFilter();
     cbKeywordStatus.ItemsSource = new List <KeyValuePair <KeywordsStatus?, string> >()
     {
         new KeyValuePair <KeywordsStatus?, string>(null, "--所有--"),
         new KeyValuePair <KeywordsStatus?, string>(KeywordsStatus.Waiting, "待审核"),
         new KeyValuePair <KeywordsStatus?, string>(KeywordsStatus.Passed, "审核通过"),
         new KeyValuePair <KeywordsStatus?, string>(KeywordsStatus.Reject, "审核拒绝"),
     };
     model.ChannelID           = "1";
     model.CompanyCode         = Newegg.Oversea.Silverlight.ControlPanel.Core.CPApplication.Current.CompanyCode;
     QuerySection.DataContext  = model;
     btnStackPanel.DataContext = model;
     base.OnPageLoad(sender, e);
 }
Exemplo n.º 3
0
        private void uploader_AllFileUploadCompleted(object sender, Basic.Controls.Uploader.AllUploadCompletedEventArgs args)
        {
            uploader.Clear();
            if (args.UploadInfo[0].UploadResult == SingleFileUploadStatus.Failed)
            {
                CPApplication.Current.CurrentPage.Context.Window.Alert(ResKeywords.Information_UploadFailed, Newegg.Oversea.Silverlight.Controls.Components.MessageType.Error);
                return;
            }

            facade = new SegmentQueryFacade(CPApplication.Current.CurrentPage);

            facade.BatchImportSegment(args.UploadInfo[0].ServerFilePath, (obj, args2) =>
            {
                if (args2.FaultsHandle())
                {
                    return;
                }
                CPApplication.Current.CurrentPage.Context.Window.Alert(ResKeywords.Information_OperateSuccessful, Newegg.Oversea.Silverlight.Controls.Components.MessageType.Information);
            });
        }