Ejemplo n.º 1
0
        // GET: Admin/Courses/New
        public async Task <ActionResult> New()
        {
            var viewModel = new CourseFormViewModel
            {
                IsNew       = true,
                CourseTypes = await _courseTypeRepository.GetCourseTypes()
            };

            // Add properties to layout
            AddPageHeader(viewModel.Title, "");

            AddBreadcrumb("Courses", Url.Action("Index", "Courses", new { area = "Admin" }));
            AddBreadcrumb(viewModel.Title, "");

            return(View("CourseForm", viewModel));
        }
Ejemplo n.º 2
0
        // GET: Admin/CourseTypes
        public async Task <ActionResult> Index()
        {
            var courseTypes = await _courseTypeRepository.GetCourseTypes();

            // Add properties to layout
            AddPageHeader("Course Types", "List of all course types");

            AddBreadcrumb("Course Types", "");

            return(View(courseTypes));
        }