protected override void OnNavigatedTo() { base.OnNavigatedTo(); using (_dataPoints.SuppressChangeNotifications()) { _dataPoints.Clear(); if (HasValidInputs) { // get the current coverage, if any var current = Person.ExistingCoverage ?? 0; var pt1 = new GapDataPoint("Existing Coverage", current); _dataPoints.Add(new GapDataPoint("", current)); _dataPoints.Add(new GapDataPoint("Existing Coverage", current)); _dataPoints.Add(new GapDataPoint("", current)); // Calc current // (Annual income)(retirement age – current age) – 30% for taxes var lifetime = Math.Round((double)((Person.AnnualIncome * (Person.RetirementAge - Person.Age)) * .7), 0, MidpointRounding.ToEven); _dataPoints.Add(new GapDataPoint("", (int)lifetime)); _dataPoints.Add(new GapDataPoint("Lifetime Value", (int)lifetime)); _dataPoints.Add(new GapDataPoint("", (int)lifetime)); } } }
protected override void OnNavigatedTo() { base.OnNavigatedTo(); using (_dataPoints.SuppressChangeNotifications()) { _dataPoints.Clear(); if (HasValidInputs) { // get the current coverage, if any var current = Person.ExistingCoverage ?? 0; var pt1 = new GapDataPoint("Existing Coverage", current); _dataPoints.Add(new GapDataPoint("", current)); _dataPoints.Add(new GapDataPoint("Existing Coverage", current)); _dataPoints.Add(new GapDataPoint("", current)); // Calc current // (Annual income)(retirement age – current age) – 30% for taxes var lifetime = Math.Round((double)((Person.AnnualIncome * (Person.RetirementAge - Person.Age)) * .7), 0, MidpointRounding.ToEven); _dataPoints.Add(new GapDataPoint("", (int)lifetime)); _dataPoints.Add(new GapDataPoint("Lifetime Value", (int)lifetime)); _dataPoints.Add(new GapDataPoint("", (int)lifetime)); } } }