Ejemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "TreatmentID,Title,Treament_Description")] Treatment treatment)
 {
     if (ModelState.IsValid)
     {
         db.Entry(treatment).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(treatment));
 }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "PhysicianID,LastName,FirstMidName,Age")] Physician physician)
 {
     if (ModelState.IsValid)
     {
         db.Entry(physician).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(physician));
 }
Ejemplo n.º 3
0
 public ActionResult Edit([Bind(Include = "Patient_TreatmentID,TreatmentID,PhysicianID,Patient_Treatment_Date")] Patient_Treatment patient_Treatment)
 {
     if (ModelState.IsValid)
     {
         db.Entry(patient_Treatment).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.PhysicianID = new SelectList(db.Physician, "PhysicianID", "LastName", patient_Treatment.PhysicianID);
     ViewBag.TreatmentID = new SelectList(db.Treatment, "TreatmentID", "Title", patient_Treatment.TreatmentID);
     return(View(patient_Treatment));
 }