public static externalDTO.Payment MapFromInternal(internalDTO.Payment payment) { var res = payment == null ? null : new externalDTO.Payment { Id = payment.Id, BillId = payment.BillId, Bill = BillMapper.MapFromInternal((payment.Bill)), PaymentMethodId = payment.PaymentMethodId, PaymentMethod = PaymentMethodMapper.MapFromInternal(payment.PaymentMethod), Sum = payment.Sum, PaymentTime = payment.PaymentTime }; return(res); }
public static externalDTO.Payment MapFromBLL(internalDTO.Payment payment) { var res = payment == null ? null : new externalDTO.Payment { Id = payment.Id, MeansOfPayment = payment.MeansOfPayment, PaymentCode = payment.PaymentCode, TimeOfPayment = payment.TimeOfPayment, Total = payment.Total, Comment = payment.Comment, InvoiceId = payment.InvoiceId, Invoice = InvoiceMapper.MapFromBLL(payment.Invoice) }; return(res); }