Exemplo n.º 1
0
        public ActionResult RegistrarPlaneacion(Planeacion planeacion)
        {
            if (planeacion != null)
            {
                TblPlaneacion tblPlaneacion = new TblPlaneacion();

                tblPlaneacion.idCatCicloEscolar     = planeacion.idCatCicloEscolar;
                tblPlaneacion.idCatGrado            = planeacion.idCatGrado;
                tblPlaneacion.idCatGrupos           = planeacion.idCatGrupos;
                tblPlaneacion.idCatMaterias         = planeacion.idCatMateria;
                tblPlaneacion.idCatPeriodo          = planeacion.idCatPeriodo;
                tblPlaneacion.TblObjetosAprendizaje = new TblObjetosAprendizaje {
                    strAprendizajeEsperado = planeacion.objetosAprendizaje.strAprendizajeEsperado
                };
                tblPlaneacion.strBloques = planeacion.strBloques;
                tblPlaneacion.strCompetenciaDesarrollar            = planeacion.strCompetenciaDesarrollar;
                tblPlaneacion.strContextoEscuela                   = planeacion.strContextoEscuela;
                tblPlaneacion.strCriteriosDesempeño                = planeacion.strCriteriosDesempeño;
                tblPlaneacion.strCriteriosEvaluacion               = planeacion.strCriteriosEvaluacion;
                tblPlaneacion.strDesempeñoEstudianteConcluirBloque = planeacion.strDesempeñoEstudianteConcluirBloque;
                tblPlaneacion.strDiagnosticoSocioEducativo         = planeacion.strDiagnosticoSocioEducativo;
                tblPlaneacion.strInstitucion   = planeacion.strInstitucion;
                tblPlaneacion.strTotalHoras    = planeacion.strTotalHoras;
                tblPlaneacion.strTotalSesiones = planeacion.strTotalSesiones;

                context.TblPlaneacion.Add(tblPlaneacion);
                context.SaveChanges();
            }
            return(RedirectToAction("Index", "Index"));
        }
Exemplo n.º 2
0
        public void DeletePlaneacion(int _idPlaneacion)
        {
            if (_idPlaneacion > 0)
            {
                TblPlaneacion planeacion = new TblPlaneacion();

                planeacion = context.TblPlaneacion.FirstOrDefault(p => p.id == _idPlaneacion);
                context.TblPlaneacion.Remove(planeacion);
                context.SaveChanges();
            }
        }