Ejemplo n.º 1
0
        void UCProductSearchForSO_Loaded(object sender, RoutedEventArgs e)
        {
            m_facade = new ProductQueryFacade(CPApplication.Current.CurrentPage);
            //商品状态
            this.cmbType.ItemsSource   = EnumConverter.GetKeyValuePairs <ProductType>(EnumConverter.EnumAppendItemType.All);
            this.cmbType.SelectedIndex = 0;

            //库存比较操作符
            CodeNamePairHelper.GetList(ConstValue.DomainName_Common, ConstValue.Key_Compare, (o, p) =>
            {
                this.cmbCompare.ItemsSource   = p.Result;
                this.cmbCompare.SelectedIndex = 0;
            });
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 请求服务,并将查询结果绑定到DataGrid
        /// </summary>
        void DataGrid_LoadingDataSource(object sender, Newegg.Oversea.Silverlight.Controls.Data.LoadingDataEventArgs e)
        {
            //1.初始化查询条件,分页信息
            //2.请求服务查询
            PagingInfo p = new PagingInfo
            {
                PageIndex = e.PageIndex,
                PageSize  = e.PageSize,
                SortBy    = e.SortField
            };

            _viewModel.C3SysNo = ProductC3SysNo;
            ProductQueryFacade facade = new ProductQueryFacade(CPApplication.Current.CurrentPage);

            facade.QueryProduct(_viewModel, p, (s, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                BindDataGrid(args.Result.TotalCount, args.Result.Rows);
            });
        }