public ActionResult DeleteConfirmed(int id) { AgendaCancelacion agendaCancelacion = db.AgendaCancelacion.Find(id); db.AgendaCancelacion.Remove(agendaCancelacion); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,agenda_id,detalle_cancel,fecha_cancel,createdon,createdby,changedon,changedby")] AgendaCancelacion agendaCancelacion) { if (ModelState.IsValid) { db.Entry(agendaCancelacion).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.agenda_id = new SelectList(db.Agenda, "Id", "createdby", agendaCancelacion.agenda_id); return(View(agendaCancelacion)); }
// GET: AgendaCancelacio/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AgendaCancelacion agendaCancelacion = db.AgendaCancelacion.Find(id); if (agendaCancelacion == null) { return(HttpNotFound()); } return(View(agendaCancelacion)); }
// GET: AgendaCancelacio/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AgendaCancelacion agendaCancelacion = db.AgendaCancelacion.Find(id); if (agendaCancelacion == null) { return(HttpNotFound()); } ViewBag.agenda_id = new SelectList(db.Agenda, "Id", "createdby", agendaCancelacion.agenda_id); return(View(agendaCancelacion)); }