public ActionResult Prescription_(int id) { TempData["ID"] = id; ViewBag.id = id; PatientModel m = new PatientModel(); ViewBag.first = m.GetPatients().Where(x => x.Id == id).FirstOrDefault().FirstName; TempData["first"] = ViewBag.first; ViewBag.last = m.GetPatients().Where(x => x.Id == id).FirstOrDefault().LastName; TempData["last"] = ViewBag.first; MedicineModel model = new MedicineModel(); return(View(model.GetMedicines())); }
public ActionResult Patients() { PatientModel model = new PatientModel(); var Patients = model.GetPatients(); return(View(Patients)); }
// GET: Patient/Edit/5 public ActionResult Edit(int id) { PatientModel model = new PatientModel(); var Patient = model.GetPatients().First(m => m.Id == id); return(View(Patient)); }
public ActionResult AreYouSure(FormCollection collection, string submit) { if (submit == "Add Prescription") { PatientModel model = new PatientModel(); model.AddPrescription(collection["id"], collection["first"], collection["last"], collection["medicine"], collection["begin"], collection["finish"], collection["ndc"], collection["Frequency"], collection["Comments"]); } var Model = new PatientModel(); return(View("Patients", Model.GetPatients())); }
public ActionResult Print(int id) { PatientModel model = new PatientModel(); var Prescription = model.GetPrescriptions().First(m => m.Id == id); Patient patient = model.GetPatients().First(p => p.Id == Prescription.PatientId); ViewBag.PatientName = patient.FirstName + " " + patient.LastName; ViewBag.PatientEmail = patient.Email; ViewBag.PatientPhone = patient.Phone; return(View(Prescription)); }
// GET: Patient/Create public ActionResult AddPatient() { var Model = new PatientModel(); return(View(Model.GetPatients())); }
// GET: Patient public ActionResult Index() { return(View(patientModel.GetPatients())); }