Esempio n. 1
0
        public ActionResult ShowCashflows(string id)
        {
            List <CashflowViewModel> lcf = new List <CashflowViewModel>();

            int lId = int.Parse(id) - 1;

            Lease l = new Lease(leaseList[lId].LeaseStart, leaseList[lId].LeaseEnd, leaseList[lId].InitialRent);


            IDictionary <DateTime, double> cf = l.getCashflows();

            foreach (var i in cf)
            {
                CashflowViewModel a = new CashflowViewModel()
                {
                    Amount = i.Value,
                    Date   = i.Key
                };

                lcf.Add(a);
            }

            return(PartialView("_LeaseCashflows", lcf));
        }