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(); }
/// <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); }); }