public ActionResult Index() { List <PLCourse> list = CourseClientService.GetCourseList(); ViewBag.breadCrumbData = "Course List"; return(View("List", list)); }
// // 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)); }
public JsonResult GetSampleCourse(int idx) { List <PLCourse> list = CourseClientService.GetCourseList(); return(this.Json(list[idx], JsonRequestBehavior.AllowGet)); }
public string GetNumCoursesTotal() { List <PLCourse> list = CourseClientService.GetCourseList(); return(list.Count.ToString()); }