public ActionResult DeleteConfirmed(int id) { FallaTarea fallaTarea = db.FallaTarea.Find(id); db.FallaTarea.Remove(fallaTarea); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,FallaId,Tarea_tarea_id")] FallaTarea fallaTarea) { if (ModelState.IsValid) { db.Entry(fallaTarea).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.FallaId = new SelectList(db.Falla, "Id", "nombre", fallaTarea.FallaId); ViewBag.Tarea_tarea_id = new SelectList(db.Tarea, "tarea_id", "descripcion", fallaTarea.Tarea_tarea_id); return(View(fallaTarea)); }
// GET: FallaTareas/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } FallaTarea fallaTarea = db.FallaTarea.Find(id); if (fallaTarea == null) { return(HttpNotFound()); } return(View(fallaTarea)); }
// GET: FallaTareas/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } FallaTarea fallaTarea = db.FallaTarea.Find(id); if (fallaTarea == null) { return(HttpNotFound()); } ViewBag.FallaId = new SelectList(db.Falla, "Id", "nombre", fallaTarea.FallaId); ViewBag.Tarea_tarea_id = new SelectList(db.Tarea, "tarea_id", "descripcion", fallaTarea.Tarea_tarea_id); return(View(fallaTarea)); }