public void ExportExcelFile(PayableQueryVM queryVM, ColumnSet[] columnSet) { PayableQueryFilter queryFilter = queryVM.ConvertVM <PayableQueryVM, PayableQueryFilter>(); queryFilter.PagingInfo = new PagingInfo { PageSize = ECCentral.Portal.Basic.ConstValue.MaxRowCountLimit, PageIndex = 0, SortBy = null }; queryFilter.CompanyCode = CPApplication.Current.CompanyCode; string relativeUrl = "/InvoiceService/Payable/Export"; restClient.ExportFile(relativeUrl, queryFilter, columnSet); }
public void Query(PayableQueryVM queryVM, int PageSize, int PageIndex, string SortField, EventHandler <RestClientEventArgs <dynamic> > callback) { PayableQueryFilter queryFilter = new PayableQueryFilter(); queryFilter = queryVM.ConvertVM <PayableQueryVM, PayableQueryFilter>(); queryFilter.PagingInfo = new PagingInfo { PageSize = PageSize, PageIndex = PageIndex, SortBy = SortField }; queryFilter.CompanyCode = CPApplication.Current.CompanyCode; string relativeUrl = "/InvoiceService/Payable/Query"; restClient.QueryDynamicData(relativeUrl, queryFilter, (obj, args) => { if (args.FaultsHandle()) { return; } callback(obj, args); }); }