コード例 #1
0
        public ActionResult Index(int id)
        {
            var alumno = _alumnosBL.ObtenerAlumnos(id);

            var censo = new CensoMaestro();

            censo.PeriodoId = 1;
            censo.AlumnoId  = id;
            censo.Alumno    = alumno;

            var asignaturas = _asignaturasBL.ObtenerAsignaturasActivos();
            var horarios    = _horarioBL.ObtenerHorarios();

            foreach (var asignatura in asignaturas)
            {
                censo.ListadeCensoDetalle.Add(new CensoDetalle()
                {
                    AsignaturaId = asignatura.Id,
                    Asignatura   = asignatura
                });
            }

            ViewBag.HorarioId = new SelectList(horarios, "Id", "Horario");

            return(View(censo));
        }
コード例 #2
0
        public ActionResult Index(Alumno alumno)
        {
            var alumnoExistente = _alumnosBL.ObtenerAlumnos(alumno.Id);

            if (alumnoExistente != null)
            {
                return(RedirectToAction("Index", "Censo", new { Id = alumno.Id }));
            }

            return(View());
        }
コード例 #3
0
        public ActionResult Index(int id)
        {
            var alumno = _alumnoBL.ObtenerAlumnos(id);

            if (alumno != null)
            {
                return(RedirectToAction("Index", "Home", new { id = alumno.Id }));
            }

            return(RedirectToAction("Index"));
        }
コード例 #4
0
        // GET: Alumno
        public ActionResult Index()
        {
            var ListadeAlumnos = _AlumnoBL.ObtenerAlumnos();

            return(View(ListadeAlumnos));
        }
コード例 #5
0
        public ActionResult GetData()
        {
            var usuList = alumnoBl.ObtenerAlumnos();

            return(Json(new { data = usuList }, JsonRequestBehavior.AllowGet));
        }