public JsonResult GetCoursesByDepartmentId(int departmentId) { List <Course> courses = aCourseAssignManager.GetAllCourses(); List <Course> courseList = courses.Where(a => a.DepartmentId == departmentId).ToList(); return(Json(courseList, JsonRequestBehavior.AllowGet)); }
public JsonResult GetCourseByDepartmentId(CourseAssign aCourseAssign) { var Course = aCourseAssignManager.GetAllCourses(); var CourseList = Course.Where(a => a.DepartmentId == aCourseAssign.DepartmentId).ToList(); return(Json(CourseList)); }
public JsonResult GetCourseByStudentId(int studentId) { List <Course> courses = aCourseAssignManager.GetAllCourses(); Student student = aEnrollCourseManager.GetStudentByRegNo(studentId); List <Course> courseList = courses.Where(a => a.DepartmentId == student.DepartmentId).ToList(); return(Json(courseList, JsonRequestBehavior.AllowGet)); }