コード例 #1
0
        public override void OnPageLoad(object sender, EventArgs e)
        {
            base.OnPageLoad(sender, e);

            this.queryVM          = new PriceChangeQueryVM();
            this.facade           = new InvoiceFacade(this);
            this.resultCollection = new ObservableCollection <PriceChangeVM>();

            this.querygd.DataContext  = this.queryVM;
            this.resultgd.ItemsSource = this.resultCollection;

            this.resultgd.Bind();
        }
コード例 #2
0
ファイル: InvoiceFacade.cs プロジェクト: sanlonezhang/ql
        /// <summary>
        /// 查询变价申请
        /// </summary>
        /// <param name="queryVM"></param>
        /// <param name="pageSize"></param>
        /// <param name="pageIndex"></param>
        /// <param name="sortField"></param>
        /// <param name="callback"></param>
        public void QueryPriceChange(PriceChangeQueryVM queryVM, int pageSize, int pageIndex, string sortField, EventHandler<RestClientEventArgs<dynamic>> callback)
        {
            ChangePriceFilter filter = queryVM.ConvertVM<PriceChangeQueryVM, ChangePriceFilter>();

            filter.PagingInfo = new PagingInfo()
            {
                PageIndex = pageIndex,
                PageSize = pageSize,
                SortBy = sortField
            };

            string relativeUrl = "/InvoiceService/Invoice/QueryPriceChange";

            restClient.QueryDynamicData(relativeUrl, filter, (obj, args) => 
            {
                if (args.FaultsHandle())
                    return;

                callback(obj,args);
            });

        }