public ActionResult DeleteConfirmed(int id) { TablaP tablap = db.TablaPs.Find(id); db.TablaPs.Remove(tablap); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "id,Periodo,TablaP1,TablaP2,TablaP3,TablaP4,TablaP5,TablaP6,TablaP7,TablaP8,TablaP9,TablaP10")] TablaP tablap) { if (ModelState.IsValid) { db.Entry(tablap).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tablap)); }
public ActionResult Create([Bind(Include = "id,Periodo,TablaP1,TablaP2,TablaP3,TablaP4,TablaP5,TablaP6,TablaP7,TablaP8,TablaP9,TablaP10")] TablaP tablap) { if (ModelState.IsValid) { db.TablaPs.Add(tablap); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tablap)); }
// GET: /TablaP/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TablaP tablap = db.TablaPs.Find(id); if (tablap == null) { return(HttpNotFound()); } return(View(tablap)); }