public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } eva_evalua_oportunidades = await _context.eva_evalua_oportunidades .Include(e => e.Competencia) .Include(e => e.CompetenciasPersona) .Include(e => e.Metodologia).SingleOrDefaultAsync(m => m.IdOportunidad == id); if (eva_evalua_oportunidades == null) { return(NotFound()); } ViewData["IdGenCalificacion"] = new SelectList(new List <SelectListItem> { new SelectListItem { Text = "Competente", Value = "1" }, new SelectListItem { Text = "Suficiente", Value = "2" }, new SelectListItem { Text = "No Alcanzada", Value = "3" } }, "Value", "Text"); ViewData["IdGenOportunidad"] = new SelectList(new List <SelectListItem> { new SelectListItem { Text = "Primer Ordinario", Value = "1" }, new SelectListItem { Text = "Segundo Ordinario", Value = "2" }, new SelectListItem { Text = "Extraordinario", Value = "3" }, new SelectListItem { Text = "Repeticion Primer Ordinario", Value = "4" }, new SelectListItem { Text = "Repeticion Segundo Ordinario", Value = "5" }, new SelectListItem { Text = "Repeticion Extraordinario", Value = "6" }, new SelectListItem { Text = "Especial", Value = "7" } }, "Value", "Text"); ViewData["IdCompetencia"] = new SelectList(_context.competencia, "IdCompetencia", "IdCompetencia"); ViewData["IdPersona"] = new SelectList(_context.eva_evalua_competencias_persona, "IdPersona", "Justificacion"); ViewData["IdMetodologia"] = new SelectList(_context.eva_cat_metodologias, "IdMetodologia", "Clave"); return(Page()); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } eva_evalua_oportunidades = await _context.eva_evalua_oportunidades.FindAsync(id); if (eva_evalua_oportunidades != null) { _context.eva_evalua_oportunidades.Remove(eva_evalua_oportunidades); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } eva_evalua_oportunidades = await _context.eva_evalua_oportunidades .Include(e => e.Competencia) .Include(e => e.CompetenciasPersona) .Include(e => e.Metodologia).SingleOrDefaultAsync(m => m.IdOportunidad == id); if (eva_evalua_oportunidades == null) { return(NotFound()); } return(Page()); }