public ActionResult DeleteConfirmed(int id) { OfertasEgresados ofertasEgresados = db.OfertasEgresados.Find(id); db.OfertasEgresados.Remove(ofertasEgresados); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,IdOfertaLaboral,IdEgresado")] OfertasEgresados ofertasEgresados) { if (ModelState.IsValid) { db.Entry(ofertasEgresados).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.IdEgresado = new SelectList(db.Egresados, "Id", "TarjetaProfesional", ofertasEgresados.IdEgresado); ViewBag.IdOfertaLaboral = new SelectList(db.OfertasLaborales, "Id", "Titulo", ofertasEgresados.IdOfertaLaboral); return(View(ofertasEgresados)); }
// GET: OfertasEgresados/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } OfertasEgresados ofertasEgresados = db.OfertasEgresados.Find(id); if (ofertasEgresados == null) { return(HttpNotFound()); } return(View(ofertasEgresados)); }
// GET: OfertasEgresados/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } OfertasEgresados ofertasEgresados = db.OfertasEgresados.Find(id); if (ofertasEgresados == null) { return(HttpNotFound()); } ViewBag.IdEgresado = new SelectList(db.Egresados, "Id", "TarjetaProfesional", ofertasEgresados.IdEgresado); ViewBag.IdOfertaLaboral = new SelectList(db.OfertasLaborales, "Id", "Titulo", ofertasEgresados.IdOfertaLaboral); return(View(ofertasEgresados)); }