public ActionResult DeletePort(JGA_PGS_PTOS jga_pgs_ptos) { jga_pgs_ptos.POTS_ESTADO = 0; jga_pgs_ptos.PTOS_TIPPTO = "borrado"; db.JGA_PGS_PTOS.Attach(jga_pgs_ptos); db.Entry(jga_pgs_ptos).Property(x => x.POTS_ESTADO).IsModified = true; db.SaveChanges(); return RedirectToAction("Puertos", new { id = jga_pgs_ptos.PTOS_NAV }); }
public ActionResult GuardarPort(JGA_PGS_PTOS jga_pgs_port) { jga_pgs_port.POTS_ESTADO = 1; db.JGA_PGS_PTOS.Add(jga_pgs_port); db.SaveChanges(); return RedirectToAction("Puertos", new { id = jga_pgs_port.PTOS_NAV }); }
public ActionResult EditPort(JGA_PGS_PTOS jga_pgs_ptos) { jga_pgs_ptos.POTS_ESTADO = 1; db.Entry(jga_pgs_ptos).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Puertos", new { id = jga_pgs_ptos.PTOS_NAV }); }