Esempio n. 1
0
 public IEnumerable <CustomerDTO> GetCustomers()
 {
     return(MapDTO.MapList <CustomerDTO, Customer>(repo.ReadCustomers()));
 }
Esempio n. 2
0
 public void ChangeCustomer(CustomerDTO customer)
 {
     repo.UpdateCustomer(MapDTO.Map <Customer, CustomerDTO>(customer));
 }
Esempio n. 3
0
 public CustomerDTO GetCustomer(int customerId)
 {
     return(MapDTO.Map <CustomerDTO, Customer>(repo.ReadCustomer(customerId)));
 }
Esempio n. 4
0
 public IEnumerable <InvoiceDetailDTO> GetInvoiceDetails(int invoiceNr)
 {
     return(MapDTO.MapList <InvoiceDetailDTO, InvoiceDetail>(repo.ReadDetails(invoiceNr)));
 }
Esempio n. 5
0
 public CustomerDTO AddCustomers(CustomerDTO customer)
 {
     repo.CreateCustomer(MapDTO.Map <Customer, CustomerDTO>(customer));
     return(customer);
 }
Esempio n. 6
0
 public IEnumerable <InvoiceDTO> GetInvoices()
 {
     return(MapDTO.MapList <InvoiceDTO, Invoice>(repo.ReadInvoices()));
 }
Esempio n. 7
0
 public void ChangeInvoice(InvoiceDTO invoice)
 {
     repo.UpdateInvoice(MapDTO.Map <Invoice, InvoiceDTO>(invoice));
 }
Esempio n. 8
0
 public InvoiceDTO GetInvoice(int invoiceNr)
 {
     return(MapDTO.Map <InvoiceDTO, Invoice>(repo.ReadInvoice(invoiceNr)));
 }
Esempio n. 9
0
 public InvoiceDTO AddInvoice(InvoiceDTO invoice)
 {
     repo.CreateInvoice(MapDTO.Map <Invoice, InvoiceDTO>(invoice));
     return(invoice);
 }
Esempio n. 10
0
 public InvoiceDetailDTO GetInvoiceDetail(int invoiceDetailId)
 {
     return(MapDTO.Map <InvoiceDetailDTO, InvoiceDetail>(repo.ReadInvoiceDetail(invoiceDetailId)));
 }
Esempio n. 11
0
 public void ChangeInvoiceDetail(InvoiceDetailDTO invoiceDetail)
 {
     repo.UpdateInvoiceDetail(MapDTO.Map <InvoiceDetail, InvoiceDetailDTO>(invoiceDetail));
 }
Esempio n. 12
0
 public InvoiceDetailDTO AddInvoiceDetail(InvoiceDetailDTO invoiceDetail)
 {
     repo.CreateInvoiceDetail(MapDTO.Map <InvoiceDetail, InvoiceDetailDTO>(invoiceDetail));
     return(invoiceDetail);
 }