Esempio n. 1
0
        public Object GetCoursesByTeaId(int id)
        {
            List <CourseDTO> cour = CourseDAO.GetCoursesByTeaId(id);
            var Courses           = new { courses = cour };

            return(Courses);
        }
Esempio n. 2
0
        // GET: Teacher
        public ActionResult Dashboard()
        {
            if (Session["login"] == null)
            {
                return(Redirect("~/Home/Index"));
            }
            List <CourseDTO> li = CourseDAO.GetCoursesByTeaId(1);

            ViewBag.courses = li;
            return(View());
        }