Ejemplo n.º 1
0
 public IActionResult Home()
 {
     if (HttpContext.Session.GetString("loggedIn") == "true")
     {
         ViewBag.loggedIn         = true;
         ViewBag.userID           = HttpContext.Session.GetInt32("userID");
         ViewBag.AllActivities    = ActivityFactory.GetActivities();
         ViewBag.JoinedActivities = ActivityFactory.MyActivities((int)HttpContext.Session.GetInt32("userID"));
         ViewBag.errors           = "";
         return(View());
     }
     return(RedirectToAction("Index", "Home"));
 }