public ActionResult DeleteConfirmed(int id) { NcfTipo ncfTipo = db.NcfTipo.Find(id); db.NcfTipo.Remove(ncfTipo); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "idTipo,nombre,status")] NcfTipo ncfTipo) { if (ModelState.IsValid) { db.Entry(ncfTipo).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(ncfTipo)); }
public ActionResult Create([Bind(Include = "idTipo,nombre,status")] NcfTipo ncfTipo) { if (ModelState.IsValid) { db.NcfTipo.Add(ncfTipo); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(ncfTipo)); }
// GET: NcfTipoes/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } NcfTipo ncfTipo = db.NcfTipo.Find(id); if (ncfTipo == null) { return(HttpNotFound()); } return(View(ncfTipo)); }