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