コード例 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            OfertasEgresados ofertasEgresados = db.OfertasEgresados.Find(id);

            db.OfertasEgresados.Remove(ofertasEgresados);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 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));
 }
コード例 #3
0
        // 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));
        }
コード例 #4
0
        // 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));
        }