public ActionResult DeleteConfirmed(int id) { TblModulo tblModulo = db.TblModulos.Find(id); db.TblModulos.Remove(tblModulo); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,Modulo,FechaCreacion")] TblModulo tblModulo) { if (ModelState.IsValid) { db.Entry(tblModulo).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tblModulo)); }
public ActionResult Create([Bind(Include = "Id,Modulo,FechaCreacion")] TblModulo tblModulo) { if (ModelState.IsValid) { db.TblModulos.Add(tblModulo); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tblModulo)); }
// GET: CL/Servicio/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TblModulo tblModulo = db.TblModulos.Find(id); if (tblModulo == null) { return(HttpNotFound()); } return(View(tblModulo)); }