public ActionResult Index()
 {
     try
     {
         var model = (TblUser)Session["UserSession"];
         if (model.RoleId == 1)
         {
             return(View());
         }
         if (model.RoleId == 2)
         {
             AdminHomeViewModel adminHomeViewModel = new AdminHomeViewModel();
             adminHomeViewModel.lstActivities = hm.GetAllAdminActivities(model.TenantId);
             adminHomeViewModel.allCounts     = hm.GetAllAdminHomeCounts(model.TenantId);
             return(View("AdminHome", adminHomeViewModel));
         }
         if (model.RoleId == 3)
         {
             HomeViewModel homeViewModel = new HomeViewModel();
             homeViewModel.lstActivities   = hm.GetAllLearnerActivities(model.TenantId, model.UserId, "Total");
             homeViewModel.TotalCount      = homeViewModel.lstActivities.Count;
             homeViewModel.CompletedCount  = homeViewModel.lstActivities.Count(p => p.ActivityStatus == "Completed");
             homeViewModel.InProgressCount = homeViewModel.lstActivities.Count(p => p.ActivityStatus == "InProgress");
             homeViewModel.NotStartedCount = homeViewModel.lstActivities.Count(p => p.ActivityStatus == "Not Started");
             var forum = fm.GetForumByForumType(model.TenantId);
             if (forum != null && forum.Count > 0)
             {
                 homeViewModel.announcement = forum[0];
             }
             return(View("LearnerHome", homeViewModel));
         }
     }
     catch (Exception ex)
     {
         newException.AddException(ex);
     }
     return(RedirectToAction("Index", "Login"));
 }