Пример #1
0
        public void ExportExcelFile(BalanceAccountQueryVM queryVM, ColumnSet[] columnSet)
        {
            BalanceAccountQueryFilter queryFilter = queryVM.ConvertVM <BalanceAccountQueryVM, BalanceAccountQueryFilter>();

            queryFilter.PagingInfo = new PagingInfo
            {
                PageSize  = ECCentral.Portal.Basic.ConstValue.MaxRowCountLimit,
                PageIndex = 0,
                SortBy    = ""
            };
            queryFilter.CompanyCode = CPApplication.Current.CompanyCode;
            string relativeUrl = "/InvoiceService/BalanceAccount/Export";

            restClient.ExportFile(relativeUrl, queryFilter, columnSet);
        }
Пример #2
0
        public void Query(BalanceAccountQueryVM queryVM, int pageSize, int pageIndex, string sortField, Action <dynamic> callback)
        {
            BalanceAccountQueryFilter filter = queryVM.ConvertVM <BalanceAccountQueryVM, BalanceAccountQueryFilter>();

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

            string relativeUrl = "/InvoiceService/BalanceAccount/Query";

            filter.CompanyCode = CPApplication.Current.CompanyCode;
            restClient.QueryDynamicData(relativeUrl, filter, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                callback(args.Result);
            });
        }