예제 #1
0
        public ActionResult QuestionOverview()
        {
            List <QuestionViewModel> questionView = new List <QuestionViewModel>();
            string status = "Open";

            List <Question> questionList =
                _questionLogic.GetAllQuestionsProfessional(Convert.ToInt32(Request.Cookies["id"]), status);

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

            return(View("../Professional/Question/Overview", questionView));
        }
예제 #2
0
        public ActionResult QuestionOverview()
        {
            int userId = int.Parse(User.Claims.FirstOrDefault(c => c.Type == System.Security.Claims.ClaimTypes.Sid).Value);

            List <QuestionViewModel> questionView = new List <QuestionViewModel>();
            string status = "Open";

            List <Question> questionList =
                _questionLogic.GetAllQuestionsProfessional(userId, status);

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

            return(View("../Professional/Question/Overview", questionView));
        }