コード例 #1
0
ファイル: Floor.xaml.cs プロジェクト: sanlonezhang/ql
        private void cbPageCodes_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var pageType = (PageCodeType?)cbPageCodes.SelectedValue;

            spPageID.Visibility = Visibility.Collapsed;
            if (pageType == PageCodeType.C1 || pageType == PageCodeType.Promotion)
            {
                facade.QueryPageID(((int)pageType).ToString(), CPApplication.Current.CompanyCode, (s, args) =>
                {
                    args.Result.Insert(0, new KeyValuePair <string, string>(string.Empty, ResCommonEnum.Enum_All));
                    cbPageID.ItemsSource   = args.Result;
                    cbPageID.SelectedIndex = 0;
                    spPageID.Visibility    = Visibility.Visible;
                });
            }
        }
コード例 #2
0
        public override void OnPageLoad(object sender, EventArgs e)
        {
            base.OnPageLoad(sender, e);

            facade = new FloorFacade(this);
            facade.GetTemplate((s, args) =>
            {
                Templates = args.Result;
            });

            facade.QueryPageID(((int)PageCodeType.Promotion).ToString(), CPApplication.Current.CompanyCode, (s, args) =>
            {
                args.Result.Insert(0, new KeyValuePair <string, string>(string.Empty, ResCommonEnum.Enum_All));
                cbPageID.ItemsSource   = args.Result;
                cbPageID.SelectedValue = string.IsNullOrEmpty(this.Request.Param) || args.Result.FirstOrDefault(t => t.Key == this.Request.Param).Key == null? string.Empty : this.Request.Param;
                DataGrid.Bind();
            });
        }
コード例 #3
0
        private void cbPageCodes_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (cbPageCodes.SelectedItem == null)
            {
                return;
            }
            var pageType = (PageCodeType?)cbPageCodes.SelectedValue;

            spPageID.Visibility = Visibility.Collapsed;
            if (pageType == PageCodeType.C1 || pageType == PageCodeType.Promotion)
            {
                facade.QueryPageID(((int)pageType).ToString(), CPApplication.Current.CompanyCode, (s, args) =>
                {
                    args.Result.Insert(0, new KeyValuePair <string, string>(string.Empty, ResCommonEnum.Enum_Select));
                    cbPageID.ItemsSource   = args.Result;
                    spPageID.Visibility    = Visibility.Visible;
                    cbPageID.SelectedValue = string.IsNullOrEmpty(Model.PageCode) ? string.Empty : Model.PageCode;
                });
            }
            else
            {
                Model.PageCode = "1";
            }
        }