Пример #1
0
        // GET: Home/Edit/5
        public ActionResult Edit(string id)
        {
            AdmAlumno admAlumno = new AdmAlumno();
            EAlumno   alumno    = admAlumno.Buscar(id);

            return(View(alumno));
        }
Пример #2
0
        public ActionResult Buscar(Alumnos.EAlumno eAlumno)
        {
            AdmAlumno admAlumno = new AdmAlumno();
            EAlumno   alumno    = admAlumno.Buscar(eAlumno.Rut);

            if (alumno != null)
            {
                return(View("Encontrado", alumno));
            }
            else
            {
                return(View("NoFound"));
            }
        }
Пример #3
0
        public ActionResult Delete(string id, EAlumno eAlumno)
        {
            try
            {
                // TODO: Add update logic here
                AdmAlumno admAlumno = new AdmAlumno();
                EAlumno   alumno    = admAlumno.Buscar(id);

                bool borrarlo = admAlumno.Eliminar(id);
                if (borrarlo)
                {
                    return(View("Borrado"));
                }
                else
                {
                    return(View());
                }
            }
            catch
            {
                return(View());
            }
        }