public ActionResult Index() { ViewBag.ServiceTypesList = new SelectList(dbServiceType.ToList(), "Id", "Name"); ViewBag.PatientsList = new SelectList(dbPatient.ToList(), "Id", "Name"); ViewBag.RoomsList = new SelectList(dbRoom.ToList(), "Id", "Name"); ViewBag.DoctorsList = new SelectList(dbDoctor.ToList(), "Id", "Name"); return(View()); }
public ActionResult GetData() { List <Patient> data = db.ToList(); return(Json(new { data = data }, JsonRequestBehavior.AllowGet)); }