public ActionResult DeleteConfirmed(int id)
 {
     AppoinntmentCancel appoinntmentCancel = db.AppointmentCancels.Find(id);
     db.AppointmentCancels.Remove(appoinntmentCancel);
     db.SaveChanges();
     return RedirectToAction("Index");
 }
 public ActionResult Edit([Bind(Include = "ID,AppointmentID,CancelDate,Reason")] AppoinntmentCancel appoinntmentCancel)
 {
     if (ModelState.IsValid)
     {
         db.Entry(appoinntmentCancel).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     ViewBag.AppointmentID = new SelectList(db.Appointments, "ID", "ID", appoinntmentCancel.AppointmentID);
     return View(appoinntmentCancel);
 }
        public ActionResult Create([Bind(Include = "ID,AppointmentID,CancelDate,Reason")] AppoinntmentCancel appoinntmentCancel)
        {
            if (ModelState.IsValid)
            {
                db.AppointmentCancels.Add(appoinntmentCancel);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            ViewBag.AppointmentID = new SelectList(db.Appointments, "ID", "ID", appoinntmentCancel.AppointmentID);
            return View(appoinntmentCancel);
        }
 // GET: AppoinntmentCancels/Delete/5
 public ActionResult Delete(int? id)
 {
     if (id == null)
     {
         return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
     }
     AppoinntmentCancel appoinntmentCancel = db.AppointmentCancels.Find(id);
     if (appoinntmentCancel == null)
     {
         return HttpNotFound();
     }
     return View(appoinntmentCancel);
 }
 // GET: AppoinntmentCancels/Edit/5
 public ActionResult Edit(int? id)
 {
     if (id == null)
     {
         return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
     }
     AppoinntmentCancel appoinntmentCancel = db.AppointmentCancels.Find(id);
     if (appoinntmentCancel == null)
     {
         return HttpNotFound();
     }
     ViewBag.AppointmentID = new SelectList(db.Appointments, "ID", "ID", appoinntmentCancel.AppointmentID);
     return View(appoinntmentCancel);
 }