Exemplo n.º 1
0
        public void Execute()
        {
            var arguments = new[] { "Id", "Amount", "Term", "Interest rate" };

            IDialog dialog = uiFactory.CreateDialog();
            var     input  = dialog.ShowDialog(arguments).ToArray();

            string  id           = input[0];
            decimal amount       = Decimal.Parse(input[1]);
            int     term         = Int32.Parse(input[2]);
            double  interestRate = Double.Parse(input[3]);

            Loan loan = factory.createLoan(id, amount, term, interestRate);

            loan.AddObserver(uiFactory.CreateLoanView());

            repository.Add(loan);
        }