コード例 #1
0
ファイル: TokenController.cs プロジェクト: punj-aab/School
 public JsonResult GetDepartmentandCourse(long id)
 {
     ScheduleViewModel objVM = new ScheduleViewModel();
     objVM.CourseList = repository.CourseByOrganization(id); //repository.Find<Course>("select * from Courses where OrganisationId = @id", id);
     objVM.DepartmentList = repository.DepartmenstByOrganization(id); //repository.Find<Department>("select * from Departments where OrganizationId = @id", id);
     return Json(objVM, "application/json;", JsonRequestBehavior.AllowGet);
 }
コード例 #2
0
ファイル: ScheduleController.cs プロジェクト: punj-aab/School
 public JsonResult GetDepartmentandCourse(long id)
 {
     ScheduleViewModel objVM = new ScheduleViewModel();
     objVM.CourseList = db.Courses.Where(x => x.OrganisationId == id).ToList();
     objVM.DepartmentList = db.Departments.Where(x => x.OrganizationId == id).ToList();
     return Json(objVM, "application/json;", JsonRequestBehavior.AllowGet);
 }