コード例 #1
0
        public ActionResult Index()
        {
            List <PLCourse> list = CourseClientService.GetCourseList();

            ViewBag.breadCrumbData = "Course List";

            return(View("List", list));
        }
コード例 #2
0
        //
        // GET: /Course/
        public ActionResult GetCourseList()
        {
            List <PLCourse>      courseList     = CourseClientService.GetCourseList();
            JavaScriptSerializer jsonSerialiser = new JavaScriptSerializer();
            string courseListJson = jsonSerialiser.Serialize(courseList);

            // return the JSON string
            return(Content(courseListJson));
        }
コード例 #3
0
        public JsonResult GetSampleCourse(int idx)
        {
            List <PLCourse> list = CourseClientService.GetCourseList();

            return(this.Json(list[idx], JsonRequestBehavior.AllowGet));
        }
コード例 #4
0
        public string GetNumCoursesTotal()
        {
            List <PLCourse> list = CourseClientService.GetCourseList();

            return(list.Count.ToString());
        }