public ActionResult EditCont(JGA_PGS_CXE jga_pgs_cxe) { jga_pgs_cxe.CXE_estado = 1; jga_pgs_cxe.CXE_tipEnt = tipo.embarcador; db.Entry(jga_pgs_cxe).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Contactos", new { id = jga_pgs_cxe.CXE_id_belong }); }
public ActionResult DeleteCont(JGA_PGS_CXE jga_pgs_cxe) { jga_pgs_cxe.CXE_estado = 0; db.JGA_PGS_CXE.Attach(jga_pgs_cxe); db.Entry(jga_pgs_cxe).Property(x => x.CXE_estado).IsModified = true; db.SaveChanges(); return RedirectToAction("Contactos", new { id = jga_pgs_cxe.CXE_id_belong }); }
public ActionResult DeleteCont(JGA_PGS_CXE jga_pgs_cxe) { //cambia el estado a cero para indicar que el contacto ya no será utilizado por el sistema. jga_pgs_cxe.CXE_estado = 0; db.JGA_PGS_CXE.Attach(jga_pgs_cxe); db.Entry(jga_pgs_cxe).Property(x => x.CXE_estado).IsModified = true; db.SaveChanges(); return RedirectToAction("Contactos", new { id = jga_pgs_cxe.CXE_id_belong }); }
public ActionResult GuardarCont(JGA_PGS_CXE jga_pgs_cxe) { jga_pgs_cxe.CXE_estado = 1; jga_pgs_cxe.CXE_tipEnt = tipo.embarcador; db.JGA_PGS_CXE.Add(jga_pgs_cxe); db.SaveChanges(); return RedirectToAction("Contactos", new { id = jga_pgs_cxe.CXE_id_belong }); }
public ActionResult GuardarCont(JGA_PGS_CXE jga_pgs_cxe) { jga_pgs_cxe.CXE_estado = 1; jga_pgs_cxe.CXE_tipEnt = tipo.agenciaExterior; db.JGA_PGS_CXE.Add(jga_pgs_cxe); db.SaveChanges(); //redirige al index de contactos. return RedirectToAction("Contactos", new { id = jga_pgs_cxe.CXE_id_belong }); }