示例#1
0
        public ActionResult DeleteConfirmed(int id)
        {
            GradoEstudio gradoEstudio = db.GradoEstudios.Find(id);

            db.GradoEstudios.Remove(gradoEstudio);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 public ActionResult Edit([Bind(Include = "Id,Nombre_Institucion,Titulo,Fecha_Graduacion,AplicanteId")] GradoEstudio gradoEstudio)
 {
     if (ModelState.IsValid)
     {
         db.Entry(gradoEstudio).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.AplicanteId = new SelectList(db.Aplicantes, "Id", "Nombre", gradoEstudio.AplicanteId);
     return(View(gradoEstudio));
 }
示例#3
0
        // GET: GradoEstudios/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            GradoEstudio gradoEstudio = db.GradoEstudios.Find(id);

            if (gradoEstudio == null)
            {
                return(HttpNotFound());
            }
            return(View(gradoEstudio));
        }
示例#4
0
        // GET: GradoEstudios/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            GradoEstudio gradoEstudio = db.GradoEstudios.Find(id);

            if (gradoEstudio == null)
            {
                return(HttpNotFound());
            }
            ViewBag.AplicanteId = new SelectList(db.Aplicantes, "Id", "Nombre", gradoEstudio.AplicanteId);
            return(View(gradoEstudio));
        }
示例#5
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            GradoEstudio = await _context.GradoEstudio.SingleOrDefaultAsync(m => m.IdCarrerarGradoEstudio == id);

            if (GradoEstudio == null)
            {
                return(NotFound());
            }
            return(Page());
        }
示例#6
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            GradoEstudio = await _context.GradoEstudio.FindAsync(id);

            if (GradoEstudio != null)
            {
                _context.GradoEstudio.Remove(GradoEstudio);
                await _context.SaveChangesAsync();
            }

            return(RedirectToPage("./Index"));
        }