Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Appointment1 appointment1 = db.Appointment1.Find(id);

            db.Appointment1.Remove(appointment1);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "appointment,appointmentID,DateTime,roomNumber,condition,doctorID")] Appointment1 appointment1)
 {
     if (ModelState.IsValid)
     {
         db.Entry(appointment1).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.doctorID = new SelectList(db.Doctor1, "doctorID", "fullName", appointment1.doctorID);
     return(View(appointment1));
 }
Example #3
0
        // GET: Appointment1/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Appointment1 appointment1 = db.Appointment1.Find(id);

            if (appointment1 == null)
            {
                return(HttpNotFound());
            }
            return(View(appointment1));
        }
Example #4
0
        // GET: Appointment1/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Appointment1 appointment1 = db.Appointment1.Find(id);

            if (appointment1 == null)
            {
                return(HttpNotFound());
            }
            ViewBag.doctorID = new SelectList(db.Doctor1, "doctorID", "fullName", appointment1.doctorID);
            return(View(appointment1));
        }