public override void OnPageLoad(object sender, EventArgs e) { facade = new KeyWordsForProductQueryFacade(this); filter = new KeyWordsForProductQueryFilter(); model = new KeyWordsForProductQueryVM(); model.CompanyCode = Newegg.Oversea.Silverlight.ControlPanel.Core.CPApplication.Current.CompanyCode; //comEditUserList //comCreateUserType.ItemsSource = EnumConverter.GetKeyValuePairs<KeywordsOperateUserType>(EnumConverter.EnumAppendItemType.All); cbShowStatus.ItemsSource = new List <KeyValuePair <ADStatus?, string> >() { new KeyValuePair <ADStatus?, string>(null, "--所有--"), new KeyValuePair <ADStatus?, string>(ADStatus.Active, "有效"), new KeyValuePair <ADStatus?, string>(ADStatus.Deactive, "无效"), }; model.ChannelID = "1"; QuerySection.DataContext = model; base.OnPageLoad(sender, e); }
private void UCAddKeywordsForProduct_Loaded(object sender, RoutedEventArgs e) { Loaded -= new RoutedEventHandler(UCAddKeywordsForProduct_Loaded); facade = new KeyWordsForProductQueryFacade(CPApplication.Current.CurrentPage); if (VM != null) { isAdd = false; VM.ChannelID = "1"; lstChannel.IsEnabled = false; LayoutRoot.DataContext = VM; } else { VM = new KeyWordsForProductQueryVM(); VM.ChannelID = "1"; LayoutRoot.DataContext = VM; } }