Пример #1
0
        public async Task <IActionResult> OnGetAsync(short?id)
        {
            idPerson = Convert.ToInt32(Request.Query["idPer"]);
            idComp   = Convert.ToInt32(Request.Query["idCompe"]);
            per      = Request.Query["per"].ToString();
            compe    = Request.Query["compe"].ToString();

            if (id == null)
            {
                return(NotFound());
            }

            eva_momentos_metodologias = await _context.eva_momentos_metodologia
                                        .Include(e => e.Metodologia)
                                        .Include(e => e.Momento)
                                        .Include(e => e.PlantillaMetodo)
                                        .Include(e => e.cat_generales)
                                        .Include(e => e.cat_tipo_generales)
                                        .Include(e => e.eva_cat_competencias)
                                        .Include(e => e.rh_cat_personas).SingleOrDefaultAsync(m => m.IdMomentoDet == id);

            if (eva_momentos_metodologias == null)
            {
                return(NotFound());
            }
            return(Page());
        }
Пример #2
0
        public async Task <IActionResult> OnGetAsync(short?id)
        {
            if (id == null)
            {
                return(NotFound());
            }


            fechaActual = DateTime.Now;
            idPerson    = Convert.ToInt32(Request.Query["idPer"]);

            eva_momentos_metodologias = await _context.eva_momentos_metodologia
                                        .Include(e => e.Metodologia)
                                        .Include(e => e.Momento)
                                        .Include(e => e.PlantillaMetodo)
                                        .Include(e => e.cat_generales)
                                        .Include(e => e.cat_tipo_generales)
                                        .Include(e => e.eva_cat_competencias)
                                        .Include(e => e.rh_cat_personas).SingleOrDefaultAsync(m => m.IdMomentoDet == id);

            if (eva_momentos_metodologias == null)
            {
                return(NotFound());
            }
            ViewData["IdMetodologia"]         = new SelectList(_context.eva_cat_metodologias, "IdMetodologia", "DesMetodologia");
            ViewData["IdMomento"]             = new SelectList(_context.eva_plantilla_momentos_metodologia, "IdMomento", "DesMomento");
            ViewData["IdPlantillaMetodo"]     = new SelectList(_context.eva_plantilla_metodologia, "IdPlantillaMetodo", "DesPlantillaMetodo");
            ViewData["IdGenCalificacion"]     = new SelectList(_context.cat_generales, "IdGeneral", "DesGeneral");
            ViewData["IdTipoGenCalificacion"] = new SelectList(_context.cat_tipos_generales, "IdTipoGeneral", "DesTipo");
            ViewData["IdCompetencia"]         = new SelectList(_context.eva_cat_competencias, "IdCompetencia", "DesCompetencia");
            ViewData["IdPersona"]             = new SelectList(_context.rh_cat_personas, "IdPersona", "Nombre");
            return(Page());
        }
        public async Task <IActionResult> OnGetAsync(short?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            eva_momentos_metodologias = await _context.eva_momentos_metodologia
                                        .Include(e => e.Metodologia)
                                        .Include(e => e.Momento)
                                        .Include(e => e.PlantillaMetodo)
                                        .Include(e => e.cat_generales)
                                        .Include(e => e.cat_tipo_generales)
                                        .Include(e => e.eva_cat_competencias)
                                        .Include(e => e.rh_cat_personas).SingleOrDefaultAsync(m => m.IdMomentoDet == id);

            if (eva_momentos_metodologias == null)
            {
                return(NotFound());
            }
            ViewData["IdMetodologia"]         = new SelectList(_context.eva_cat_metodologias, "IdMetodologia", "IdMetodologia");
            ViewData["IdMomento"]             = new SelectList(_context.eva_plantilla_momentos_metodologia, "IdMomento", "IdMomento");
            ViewData["IdPlantillaMetodo"]     = new SelectList(_context.eva_plantilla_metodologia, "IdPlantillaMetodo", "IdPlantillaMetodo");
            ViewData["IdGenCalificacion"]     = new SelectList(_context.cat_generales, "IdGeneral", "IdGeneral");
            ViewData["IdTipoGenCalificacion"] = new SelectList(_context.cat_tipos_generales, "IdTipoGeneral", "IdTipoGeneral");
            ViewData["IdCompetencia"]         = new SelectList(_context.eva_cat_competencias, "IdCompetencia", "IdCompetencia");
            ViewData["IdPersona"]             = new SelectList(_context.rh_cat_personas, "IdPersona", "IdPersona");
            return(Page());
        }
        public async Task <IActionResult> OnPostAsync(short?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            eva_momentos_metodologias = await _context.eva_momentos_metodologia.FindAsync(id);

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

            idPerson = Convert.ToInt32(Request.Query["idPer"]);
            idComp   = Convert.ToInt32(Request.Query["idCompe"]);
            per      = Request.Query["per"].ToString();
            compe    = Request.Query["compe"].ToString();

            return(RedirectToPage("./Index", new { id = idPerson, idcompetencia = idComp, nombre = per, nomcompetencia = compe }));
        }