Exemple #1
0
        public async Task <ActionResult> DownloadChargeBreakdown(Guid id)
        {
            CSVFileData csvFileData;

            using (IWeeeClient client = weeeClient())
            {
                var request = new FetchInvoiceRunCsv(id);
                csvFileData = await client.SendAsync(User.GetAccessToken(), request);
            }

            byte[] data = new UTF8Encoding().GetBytes(csvFileData.FileContent);
            return(File(data, "text/csv", CsvFilenameFormat.FormatFileName(csvFileData.FileName)));
        }
        public async Task<ActionResult> DownloadChargeBreakdown(Guid id)
        {
            CSVFileData csvFileData;
            using (IWeeeClient client = weeeClient())
            {
                var request = new FetchInvoiceRunCsv(id);
                csvFileData = await client.SendAsync(User.GetAccessToken(), request);
            }

            byte[] data = new UTF8Encoding().GetBytes(csvFileData.FileContent);
            return File(data, "text/csv", CsvFilenameFormat.FormatFileName(csvFileData.FileName));
        }