Ejemplo n.º 1
0
        private static void InvoiceEvent(Loan loan, LoanEvent loanEvent)
        {
            var firstDayOfMonth     = new DateTime(loanEvent.EventTime.Year, loanEvent.EventTime.Month, 1);
            var firstDayOfNextMonth = firstDayOfMonth.AddMonths(1);

            loan.AddInvoice(loanEvent.EventTime, firstDayOfMonth, firstDayOfNextMonth, loanEvent.Amount);
        }
Ejemplo n.º 2
0
        private static void PayEvent(Loan loan, LoanEvent loanEvent)
        {
            var payment = loan.Pay(loanEvent.EventTime, loanEvent.Amount);

            Console.WriteLine(payment.ToString());
        }