public static void EliminarAlumno(String id)
        {
            N_Docente n_alumno = new N_Docente();

            E_PERSONA e_persona = new E_PERSONA(Convert.ToInt32(id));

            n_alumno.eliminarAlumno(e_persona);
        }
        public static void ActualizarAlumno(String id, String nom, String pat, String mat, String dni, String fecha, String tel, String direccion)
        {
            N_Docente n_alumno = new N_Docente();

            E_PERSONA e_persona = new E_PERSONA(Convert.ToInt32(id), nom, pat, mat, dni, fecha, tel, direccion, "A");

            n_alumno.actualizarAlumno(e_persona);
        }
        public static List <E_PERSONA> ListarAlumnos()
        {
            List <E_PERSONA> Lista    = null;
            N_Docente        n_alumno = new N_Docente();

            try
            {
                Lista = n_alumno.listarAlumnos();
            }
            catch
            {
                return(null);
            }
            return(Lista);
        }
Exemplo n.º 4
0
        protected void btnRegistrarDocente_Click1(object sender, EventArgs e)
        {
            if (txtNombre.Text != "" || txtApePa.Text != "" || txtApeMa.Text != "" || txtNumDoc.Text != "" ||
                txtNaci.Text != "" || txtTelefono.Text != "" || txtDireccion.Text != "" || Nivel.Text != "")
            {
                N_Docente n_docente = new N_Docente();

                E_PERSONA e_persona = new E_PERSONA(txtNombre.Text, txtApePa.Text, txtApeMa.Text, txtNumDoc.Text, txtNaci.Text, txtTelefono.Text, txtDireccion.Text, Nivel.Text, "A");
                E_NIVEL   e_nivel   = new E_NIVEL(Convert.ToInt32(Nivel.Text));
                n_docente.insertarDocente(e_persona, e_nivel);
            }
            else
            {
                Response.Write("<script>alert('INGRESE TODOS LOS CAMPOS')</script>");
            }
        }
        protected void btnRegistrarAlumno_Click(object sender, EventArgs e)
        {
            if (txtNombre.Text != "" || txtApePa.Text != "" || txtApeMa.Text != "" || txtNumDoc.Text != "" ||
                txtNaci.Text != "" || txtTelefono.Text != "" || txtDireccion.Text != "")
            {
                N_Docente n_alumno = new N_Docente();

                E_PERSONA e_persona = new E_PERSONA(txtNombre.Text, txtApePa.Text, txtApeMa.Text, txtNumDoc.Text, txtNaci.Text, txtTelefono.Text, txtDireccion.Text, txtSexo.Text, "A");

                n_alumno.insertarAlumno(e_persona);

                limpiarCampos();
            }
            else
            {
                Response.Write("<script>alert('INGRESE TODOS LOS CAMPOS')</script>");
            }
        }