public Invoice_Header Map_InvoiceHeaderDataModel_ToViewModel(InvoiceHeader_DataModel _invoiceHeader, List <Invoice_Detail> result_invoiceDetails) { Invoice_Header result = new Invoice_Header() { Supplier_Invoice_Number = _invoiceHeader.Supplier_Invoice_No, Invoice_Currency = _invoiceHeader.Invoice_Currency, Invoice_Details = result_invoiceDetails, Exchange_Rate = _invoiceHeader.Exchange_Rate }; return(result); }
private List <Invoice_Detail> Return_InvoiceDetails_ToList(InvoiceHeader_DataModel _invoiceHeader) { var result = new List <Invoice_Detail>(); IEnumerable <InvoiceDetail_DataModel> _invoiceDtlDataModel = performLookup.Return_ConsignmentInvoiceDetails_ToDataModel(_invoiceHeader.Consignment_Number, _invoiceHeader.Supplier_Invoice_No); if (_invoiceDtlDataModel != null) { foreach (InvoiceDetail_DataModel _invoiceDetail in _invoiceDtlDataModel) { Invoice_Detail _newDetail = viewModelAdapter.Map_InvoiceDetailDataModel_ToViewModel(_invoiceDetail); result.Add(_newDetail); } } return(result); }