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));
        }
Example #2
0
        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));
        }
Example #3
0
        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));
        }