public ActionResult DeleteConfirmed(int id) { tbl_Evento tbl_Evento = db.tbl_Evento.Find(id); db.tbl_Evento.Remove(tbl_Evento); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "id,Nombre,Fecha,Activo")] tbl_Evento tbl_Evento) { if (ModelState.IsValid) { db.Entry(tbl_Evento).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tbl_Evento)); }
public ActionResult Create([Bind(Include = "id,Nombre,Fecha,Activo")] tbl_Evento tbl_Evento) { if (ModelState.IsValid) { db.tbl_Evento.Add(tbl_Evento); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tbl_Evento)); }
// GET: Evento/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tbl_Evento tbl_Evento = db.tbl_Evento.Find(id); if (tbl_Evento == null) { return(HttpNotFound()); } return(View(tbl_Evento)); }
// GET: Evento/Edit/5 public ActionResult AgregarPadron(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tbl_Evento tbl_Evento = db.tbl_Evento.Find(id); if (tbl_Evento == null) { return(HttpNotFound()); } //return RedirectToAction("Create", new RouteValueDictionary( // new { controller = PatronAsociado, action = "Main", Id = Id })); return(View()); }