public ActionResult QuestionClosedOverview()
        {
            List <QuestionViewModel> questionView = new List <QuestionViewModel>();

            foreach (Question question in _questionLogic.GetAllClosedQuestionsVolunteer(Convert.ToInt32(Request.Cookies["id"])))
            {
                questionView.Add(new QuestionViewModel(question, _userLogic.GetUserById(question.CareRecipientId)));
            }

            return(View("../Volunteer/Question/OverviewClosed", questionView));
        }
Esempio n. 2
0
        public ActionResult QuestionClosedOverview()
        {
            int userId = int.Parse(User.Claims.FirstOrDefault(c => c.Type == System.Security.Claims.ClaimTypes.Sid).Value);

            List <QuestionViewModel> questionView = new List <QuestionViewModel>();

            foreach (Question question in _questionLogic.GetAllClosedQuestionsVolunteer(userId))
            {
                questionView.Add(new QuestionViewModel(question, _userLogic.GetUserById(question.CareRecipientId)));
            }

            return(View("../Volunteer/Question/OverviewClosed", questionView));
        }