public ActionResult ResultPage(List <string> revenues) { Income income = new Income(_countFamilyPeople); income.SetIncome(revenues); var answs_1 = _questions.Where(q => q.TextQuestion.Contains("возраст")).FirstOrDefault().Answers.Select(a => a.TextAnswer); var answs_2 = _questions.Where(q => q.TextQuestion.Contains("пол.")).FirstOrDefault().Answers.Select(a => a.TextAnswer);; try { string peopleGroup = answers.Where(a => answs_1.Contains(a.TextAnswer)).FirstOrDefault().TextAnswer; string gender = answers.Where(a => answs_2.Contains(a.TextAnswer)).FirstOrDefault().TextAnswer; if (peopleGroup.Contains("Дети") || peopleGroup.Contains("Подростки")) { income.PVSDD = 13489.5; } else if (peopleGroup.Contains("Пенсионеры")) { income.PVSDD = 10945.5; } else if (peopleGroup.Contains("Трудоспособные в возрасте") && gender.Contains("Женский")) { income.PVSDD = 10945.5; } else { income.PVSDD = 14247; } if (income.GetResultSDDFamily()) { Answer answer = new Answer { CostAnswer = 1000 }; answers.Add(answer); } } catch { if (revenues != null) { income.PVSDD = 14247; if (income.GetResultSDDFamily()) { Answer answer = new Answer { CostAnswer = 1000 }; answers.Add(answer); } } } _interview.Answers = new List <Answer>(); foreach (var a in answers) { _interview.Answers.Add(a); } Result result = ManagerInterview.GetResultInterview(_interview); return(View(_interview)); }