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