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