public void QueryReconciliation(ReconciliationQueryVM queryVM, int pageSize, int pageIndex, string sortField, EventHandler<RestClientEventArgs<dynamic>> callback) { ReconciliationQueryFilter filter = queryVM.ConvertVM<ReconciliationQueryVM, ReconciliationQueryFilter>(); filter.CompanyCode = CPApplication.Current.CompanyCode; filter.PagingInfo = new PagingInfo() { PageIndex = pageIndex, PageSize = pageSize, SortBy = sortField }; string relativeUrl = "/InvoiceService/Invoice/QueryReconciliation"; restClient.QueryDynamicData(relativeUrl, filter, callback); //restClient.QueryDynamicData(relativeUrl, filter, (obj, args) => //{ // ReconciliationQueryResultVM result = new ReconciliationQueryResultVM(); // if (args.Result[0] != null && args.Result[0].Rows != null) // { // result.ResultList = DynamicConverter<ReconciliationVM>.ConvertToVMList(args.Result[0].Rows); // result.TotalCount = args.Result[0].TotalCount; // } //}); }
private void InitData() { queryVM = new ReconciliationQueryVM(); SeachBuilder.DataContext = queryVM; }