public ActionResult Create([Bind(Include = "GlobalTreatment_ID,Treatment_Name")] treatment treatment) { if (ModelState.IsValid) { db.treatments.Add(treatment); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(treatment)); }
public ActionResult Create([Bind(Include = "RecordType_ID,RecordType_Name")] record_type record_type) { if (ModelState.IsValid) { db.record_type.Add(record_type); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(record_type)); }
public ActionResult Create([Bind(Include = "RecordEntry_ID,Record_ID,Entry,Date,Notes")] record_entry record_entry) { if (ModelState.IsValid) { db.record_entry.Add(record_entry); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Record_ID = new SelectList(db.records, "Record_ID", "Record_ID", record_entry.Record_ID); return(View(record_entry)); }
public ActionResult Create([Bind(Include = "Record_ID,Record_Type")] record record) { if (ModelState.IsValid) { db.records.Add(record); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Record_Type = new SelectList(db.record_type, "RecordType_ID", "RecordType_Name", record.Record_Type); return(View(record)); }
public ActionResult Create([Bind(Include = "patients_ID,First_Name,Last_Name,DOB,Sex_Male,Diagnosis,Medical_Record,Family_History")] patient patient) { if (ModelState.IsValid) { db.patients.Add(patient); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Family_History = new SelectList(db.records, "Record_ID", "Record_ID", patient.Family_History); ViewBag.Medical_Record = new SelectList(db.records, "Record_ID", "Record_ID", patient.Medical_Record); return(View(patient)); }
public ActionResult Create([Bind(Include = "AppliedTreatments_ID,Patient_ID,GlobalTreatment_ID,Date,Effect")] applied_treatments applied_treatments) { if (ModelState.IsValid) { db.applied_treatments.Add(applied_treatments); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.GlobalTreatment_ID = new SelectList(db.treatments, "GlobalTreatment_ID", "Treatment_Name", applied_treatments.GlobalTreatment_ID); ViewBag.Patient_ID = new SelectList(db.patients, "patients_ID", "First_Name", applied_treatments.Patient_ID); return(View(applied_treatments)); }