public ActionResult Edit([Bind(Include = "DoctorId,Name,Password,City,ContactNo")] Doctor doctor)
 {
     if (ModelState.IsValid)
     {
         db.Entry(doctor).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(doctor));
 }
示例#2
0
 public ActionResult Edit([Bind(Include = "PatientId,Name,Password,Age,BloodGroup,Allergy,ContactNo,Gender,Address,City,Pincode")] Patient patient)
 {
     if (ModelState.IsValid)
     {
         db.Entry(patient).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Details", new{ id = Session["id"] }));
     }
     return(View(patient));
 }
 public ActionResult Edit([Bind(Include = "HistoryId,PatientId,Disease,Hospital,City,Doctor,DateFrom,DateTo")] History history)
 {
     if (ModelState.IsValid)
     {
         db.Entry(history).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Details", new { id = Session["id"] }));
     }
     ViewBag.PatientId = new SelectList(db.Patients, "PatientId", "Name", history.PatientId);
     return(View(history));
 }
 public ActionResult Edit([Bind(Include = "PatientId,HistoryId,Path")] Document document)
 {
     if (ModelState.IsValid)
     {
         db.Entry(document).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.HistoryId = new SelectList(db.Histories, "HistoryId", "Disease", document.HistoryId);
     ViewBag.PatientId = new SelectList(db.Patients, "PatientId", "Name", document.PatientId);
     return(View(document));
 }