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