Exemplo n.º 1
0
        public async Task <ActionResult> DetailsCourse(string code)
        {
            ViewBag.Url = Url.Action("AllCourses");
            DetailsCourseViewModel detailsCourse = new DetailsCourseViewModel();
            var DisciplineList = await DisciplineWebAPI.GetDisciplinesByCourse(code);

            DisciplineList.ForEach(x =>
            {
                x.ShowTeachers      = false;
                x.CourseOptionRoute = (int)CourseOptionRouteEnum.INDIVIDUAL;
                x.CodeCourse        = code;
            });

            detailsCourse.Course = await CourseWebAPI.GetCourseById(code);

            detailsCourse.DisciplineList = DisciplineList;
            var TeacherList = await TeacherWebAPI.GetTeachersByCourse(code);

            TeacherList.ForEach(x =>
            {
                x.ShowDisciplines = false;
                x.CodeCourse      = code;
            });
            detailsCourse.TeacherList = TeacherList;
            return(View(detailsCourse));
        }
Exemplo n.º 2
0
        public async Task <ActionResult> PostGraduateCourses()
        {
            ViewBag.Url = Url.Action("PostGraduateCourses");
            List <Course> CourseList = await CourseWebAPI.GetCoursesByType("GetPosGrad");

            CourseList.ForEach(x => { x.OptionRoute = (int)CourseOptionRouteEnum.POSTGRADUATE; });
            return(View(CourseList));
        }
Exemplo n.º 3
0
        public async Task <ActionResult> AllCourses()
        {
            ViewBag.Url = Url.Action("AllCourses");
            List <Course> CourseList = await CourseWebAPI.GetAllCourses();

            CourseList.ForEach(x => { x.OptionRoute = (int)CourseOptionRouteEnum.ALL; });
            return(View(CourseList));
        }
Exemplo n.º 4
0
        public async Task <ActionResult> AllTeachers(string code)
        {
            ViewBag.Url = Url.Action("AllTeachers", "Teacher");
            Course course = await CourseWebAPI.GetCourseById(code);

            List <Teacher> TeacherList = await TeacherWebAPI.GetTeachersByCourse(code);

            TeacherList.ForEach(x =>
            {
                x.ShowDisciplines = false;
                x.CodeCourse      = code;
            });
            TeacherIndexViewModel teacherIndex = new TeacherIndexViewModel
            {
                Course      = course,
                TeacherList = TeacherList
            };

            return(View(teacherIndex));
        }
Exemplo n.º 5
0
        public async Task <ActionResult> AllDisciplines(string code, int option)
        {
            ViewBag.Url = Url.Action("AllCourses");
            Course course = await CourseWebAPI.GetCourseById(code);

            List <Discipline> DisciplineList = await DisciplineWebAPI.GetDisciplinesByCourse(code);

            DisciplineList.ForEach(x =>
            {
                x.ShowTeachers      = false;
                x.CourseOptionRoute = option;
                x.CodeCourse        = code;
            });
            DisciplineIndexViewModel disciplineIndex = new DisciplineIndexViewModel
            {
                Course         = course,
                DisciplineList = DisciplineList
            };

            return(View(disciplineIndex));
        }