示例#1
0
 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));
 }
示例#2
0
 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));
 }
示例#3
0
 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));
 }