Esempio n. 1
0
        public async Task <IActionResult> Qustions()
        {
            try
            {
                ViewBag.QuestionData = _repositry.getQuestions();
                var user = await _manager.GetUserAsync(User);

                ViewBag.IsDoctor = user.IsDoctor;
                // _manager.GetUserAsync();
            }
            catch (Exception ex)
            {
                Console.WriteLine("--" + ex);
            }

            return(View());
        }
Esempio n. 2
0
 public IActionResult Index()
 {
     try
     {
         ViewBag.Stories    = _repositry.getStories();
         ViewBag.Articles   = _articles.getArticles();
         ViewBag.Questions  = _questions.getQuestions();
         ViewBag.Users      = _users.GetUsers();
         ViewBag.Volunteers = _volunteer.getVolunteers();
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex);
     }
     return(View());
 }