internal DataTable GetGoalValue(int goalId, int plannerId, int RiskProfileID) { _goal = _goalsInfo.GetById(goalId, plannerId); var plannerInfo = new PlannerInfo.PlannerInfo(); _planner = plannerInfo.GetPlanDataById(plannerId); _goalsValueCal = GoalCalManager.GetGoalValueCalculation(_goal); setGoalValueTable(_goalsValueCal); return(_dtGoalValue); }
internal double GetGoalFutureValue(Goals goal) { if (_planner == null) { var plannerInfo = new PlannerInfo.PlannerInfo(); _planner = plannerInfo.GetPlanDataById(goal.Pid); } //FV = PV * (1 + I)T; double currentValue = goal.Amount; decimal interest_rate = goal.InflationRate / 100; int years = getYears(goal.StartYear); decimal futureValue = (decimal)currentValue * ((decimal)Math.Pow((double)(1 + interest_rate), (double)years)); return(Math.Round((double)futureValue)); }
public DataTable GenerateCashFlow(int clientId, int planId, int riskProfileId) { _dtCashFlow = new DataTable(); var plannerInfo = new PlannerInfo.PlannerInfo(); _planId = planId; _planner = plannerInfo.GetPlanDataById(planId); _riskProfileInfo = new RiskProfileInfo(); GoalCalculationMgr = new GoalCalculationManager(_planner, _riskProfileInfo, riskProfileId); CashFlowCalculation cashFlow = GetCashFlowData(clientId, planId, riskProfileId); if (cashFlow != null) { createTableCashFlowStructure(); generateCashFlowData(); } return(_dtCashFlow); }