Exemplo n.º 1
0
        private void UCViewHotSearchKeywords_Loaded(object sender, RoutedEventArgs e)
        {
            Loaded -= new RoutedEventHandler(UCViewHotSearchKeywords_Loaded);
            facade  = new HotKeywordsQueryFacade(CPApplication.Current.CurrentPage);

            if (Model != null)
            {
                facade.GetHotKeywordsListByPageType(Model, (obj, args) => {
                    if (args.FaultsHandle())
                    {
                        return;
                    }

                    StringBuilder str = new StringBuilder();
                    foreach (string keyword in args.Result)
                    {
                        str.Append(keyword).Append("|");
                    }
                    tbIndexPageKeywords.Text = str.ToString().TrimEnd('|');
                });
            }
            else
            {
                CPApplication.Current.CurrentPage.Context.Window.Alert(ResKeywords.Information_DonotExsitTheKeywords, Newegg.Oversea.Silverlight.Controls.Components.MessageType.Warning);
            }
        }
Exemplo n.º 2
0
        public override void OnPageLoad(object sender, EventArgs e)
        {
            facade                   = new HotKeywordsQueryFacade(this);
            filter                   = new HotKeywordsQueryFilter();
            queryVM                  = new HotKeywordsQueryVM();
            queryVM.CompanyCode      = CPApplication.Current.CompanyCode;
            queryVM.ChannelID        = "1";
            QuerySection.DataContext = queryVM;

            facade.GetHotKeywordsEditUserList(CPApplication.Current.CompanyCode, (s, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }

                BindEditUserList(args.Result);
            });
            base.OnPageLoad(sender, e);
        }
Exemplo n.º 3
0
 private void UCAddHotKeywords_Loaded(object sender, RoutedEventArgs e)
 {
     Loaded -= new RoutedEventHandler(UCAddHotKeywords_Loaded);
     facade  = new HotKeywordsQueryFacade(CPApplication.Current.CurrentPage);
     cbShowStatus.ItemsSource = new List <KeyValuePair <NYNStatus, string> >()
     {
         new KeyValuePair <NYNStatus, string>(NYNStatus.Yes, "否"),
         new KeyValuePair <NYNStatus, string>(NYNStatus.No, "是"),
     };
     if (VM != null)
     {
         VM.ChannelID           = "1";
         LayoutRoot.DataContext = VM;
         this.ucPageType.PageTypeLoadCompleted += new EventHandler(ucPageType_PageTypeLoadCompleted);
         this.ucPageType.PageLoadCompleted     += new EventHandler(ucPageType_PageLoadCompleted);
     }
     else
     {
         VM                     = new HotKeywordsVM();
         VM.ChannelID           = "1";
         VM.IsOnlineShow        = NYNStatus.Yes;
         LayoutRoot.DataContext = VM;
     }
 }