示例#1
0
        /// <summary>
        /// 发票打印导出
        /// </summary>
        /// <param name="queryVM"></param>
        /// <param name="columnSet"></param>
        public void ExportAllInvoiceExcelFile(InvoicePrintAllQueryVM queryVM, ColumnSet[] columnSet)
        {
            InvoicePrintAllQueryFilter queryFilter = queryVM.ConvertVM <InvoicePrintAllQueryVM, InvoicePrintAllQueryFilter>();

            queryFilter.PagingInfo = new PagingInfo
            {
                PageSize  = ECCentral.Portal.Basic.ConstValue.MaxRowCountLimit,
                PageIndex = 0,
                SortBy    = ""
            };
            string relativeUrl = "/InvoiceService/InvoiceReport/AllInvoice";

            queryFilter.CompanyCode = CPApplication.Current.CompanyCode;
            restClient.ExportFile(relativeUrl, queryFilter, columnSet);
        }
示例#2
0
        /// <summary>
        /// 发票打印查询所有发票
        /// </summary>
        /// <param name="queryVM"></param>
        /// <param name="pageSize"></param>
        /// <param name="pageIndex"></param>
        /// <param name="sortField"></param>
        /// <param name="callback"></param>
        public void QueryAllInvoice(InvoicePrintAllQueryVM queryVM, int pageSize, int pageIndex, string sortField, Action <dynamic> callback)
        {
            InvoicePrintAllQueryFilter filter = queryVM.ConvertVM <InvoicePrintAllQueryVM, InvoicePrintAllQueryFilter>();

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

            string relativeUrl = "/InvoiceService/InvoiceReport/AllInvoice";

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