Exemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "GlobalTreatment_ID,Treatment_Name")] treatment treatment)
 {
     if (ModelState.IsValid)
     {
         db.Entry(treatment).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(treatment));
 }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "RecordType_ID,RecordType_Name")] record_type record_type)
 {
     if (ModelState.IsValid)
     {
         db.Entry(record_type).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(record_type));
 }
Exemplo n.º 3
0
 public ActionResult Edit([Bind(Include = "RecordEntry_ID,Record_ID,Entry,Date,Notes")] record_entry record_entry)
 {
     if (ModelState.IsValid)
     {
         db.Entry(record_entry).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Record_ID = new SelectList(db.records, "Record_ID", "Record_ID", record_entry.Record_ID);
     return(View(record_entry));
 }
Exemplo n.º 4
0
 public ActionResult Edit([Bind(Include = "Record_ID,Record_Type")] record record)
 {
     if (ModelState.IsValid)
     {
         db.Entry(record).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Record_Type = new SelectList(db.record_type, "RecordType_ID", "RecordType_Name", record.Record_Type);
     return(View(record));
 }
Exemplo n.º 5
0
 public ActionResult Edit([Bind(Include = "patients_ID,First_Name,Last_Name,DOB,Sex_Male,Diagnosis,Medical_Record,Family_History")] patient patient)
 {
     if (ModelState.IsValid)
     {
         db.Entry(patient).State = EntityState.Modified;
         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 Edit([Bind(Include = "AppliedTreatments_ID,Patient_ID,GlobalTreatment_ID,Date,Effect")] applied_treatments applied_treatments)
 {
     if (ModelState.IsValid)
     {
         db.Entry(applied_treatments).State = EntityState.Modified;
         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));
 }