public ActionResult DeleteConfirmed(int id) { RESPONSABLE rESPONSABLE = db.RESPONSABLE.Find(id); db.RESPONSABLE.Remove(rESPONSABLE); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "id,nombre,descripcion,auxiliar")] RESPONSABLE rESPONSABLE) { if (ModelState.IsValid) { db.Entry(rESPONSABLE).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(rESPONSABLE)); }
public ActionResult Create([Bind(Include = "id,nombre,descripcion,auxiliar")] RESPONSABLE rESPONSABLE) { if (ModelState.IsValid) { rESPONSABLE.id = db.RESPONSABLE.Max(x => x.id) + 1; db.RESPONSABLE.Add(rESPONSABLE); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(rESPONSABLE)); }
// GET: RESPONSABLEs/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } RESPONSABLE rESPONSABLE = db.RESPONSABLE.Find(id); if (rESPONSABLE == null) { return(HttpNotFound()); } return(View(rESPONSABLE)); }