public ActionResult Edit([Bind(Include = "DOCTOID,NAME,SURNAME,DOB,ADDRESS,STREET,POSTCODE,MOBILE")] DOCTOR doctor) { if (ModelState.IsValid) { db.Entry(doctor).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(doctor)); }
public ActionResult Edit([Bind(Include = "AdminID,USERNAME,PASSWORD")] ADMIN aDMIN) { if (ModelState.IsValid) { db.Entry(aDMIN).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(aDMIN)); }
public ActionResult Edit([Bind(Include = "CUSTOMERID,NAME,SURNAME,DOB,ADDRESS,STREET,POSTCODE,MOBILE,DOCTORID")] CUSTOMER cUSTOMER) { if (ModelState.IsValid) { db.Entry(cUSTOMER).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.DOCTORID = new SelectList(db.DOCTORS, "DOCTOID", "NAME", cUSTOMER.DOCTORID); return(View(cUSTOMER)); }