| 12345678910111213141516171819202122232425262728293031 |
- using Comal.Classes;
- using InABox.Core;
- using InABox.Poster.CSV;
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace PRS.Shared
- {
- public class InvoiceCSVPoster : ICSVPoster<Invoice>
- {
- public ICSVExport Process(IEnumerable<Invoice> entities)
- {
- var export = new CSVExport<Invoice>();
- export.DefineMapping(new()
- {
- new("Number", x => x.Number),
- new("Date", x => x.Date),
- new("Description", x => x.Description),
- new("ExTax", x => x.ExTax),
- new("Tax", x => x.Tax),
- new("IncTax", x => x.IncTax)
- });
- foreach(var entity in entities)
- {
- export.Add(entity);
- }
- return export;
- }
- }
- }
|