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