Ejemplo n.º 1
0
        public ActionResult Index()
        {
            Person user = ConnexionService.GetSession();

            if (user == null)
            {
                ViewBag.CoursesNotLaunched = courseBL.GetNotLaunchedCourses();
                ViewBag.CoursesLaunched    = courseBL.GetLaunchedCourses();
                return(View());
            }
            else if (user is Instructor)
            {
                WeeklyScheduleVM weeklySchedule = new WeeklyScheduleVM();
                weeklySchedule.Agenda   = scheduleBL.GetWeeklyScheduleInstructor(user.ID);
                weeklySchedule.UserName = user.FullName;
                return(View("IndexInstructor", weeklySchedule));
            }
            else if (user is Student)
            {
                return(View("IndexStudent"));
            }
            return(View("IndexStudent"));
        }