public ActionResult RefinancingCalculator(RefinancingCalcParamsVM model)
        {
            if (!model.IsModelValid(ModelState))
            {
                return(PartialView("_InvalidRefinancingParamsPartial", model));
            }

            var parameters = GetParamsFromModel(model);
            RefinancingCalcResults   refinancingResult          = this.calculatorService.CalculateRefinancing(parameters);
            RefinancingCalcResultsVM refinancingViewModelResult = GetResultsForModel(refinancingResult);

            return(PartialView("_RefinancingResultsPartial", refinancingViewModelResult));
        }
        private RefinancingCalcResultsVM GetResultsForModel(RefinancingCalcResults res)
        {
            RefinancingCalcResultsVM mRes = new RefinancingCalcResultsVM();

            mRes.CurrMonthlyInstallment = res.CurrMonthlyInstallment;
            mRes.CurrPeriod             = res.CurrPeriod;
            mRes.CurrPreTermFee         = res.CurrPreTermFee;
            mRes.CurrRate              = res.CurrRate;
            mRes.CurrTotalPaid         = res.CurrTotalPaid;
            mRes.NewMonthlyInstallment = res.NewMonthlyInstallment;
            mRes.NewPeriod             = res.NewPeriod;
            mRes.NewRate      = res.NewRate;
            mRes.NewTotalPaid = res.NewTotalPaid;

            return(mRes);
        }