예제 #1
0
        // GET: Class/List
        public ActionResult List()
        {
            ClassDataController controller = new ClassDataController();
            IEnumerable <Class> Classes    = controller.ListClasses();

            return(View(Classes));
        }
        // GET : /Teacher/Show
        public ActionResult Show(int id)
        {
            TeacherDataController controller = new TeacherDataController();

            ViewBag.Teacher = controller.FindTeacher(id);
            ClassDataController ClassController = new ClassDataController();

            ViewBag.Class = ClassController.FindTeacherClass(id);
            return(View());
        }
예제 #3
0
        // GET: Class/Show/{int id}
        public ActionResult Show(int id)
        {
            ClassDataController controller = new ClassDataController();
            Class NewClass = controller.FindClass(id);

            ViewBag.Class = NewClass;
            TeacherDataController teachercontroller = new TeacherDataController();

            ViewBag.Teacher = teachercontroller.FindTeacher((int)NewClass.TeacherId);
            return(View());
        }