public void buscar()
        {
            AlumnoBO   oAlumnoBO   = new AlumnoBO();
            AlumnoCtrl oAlumnoCtrl = new AlumnoCtrl();

            if (txtMatricula.Text.Trim().Length != 0)
            {
                oAlumnoBO.Matricula = Convert.ToInt32(txtMatricula.Text.Trim());
            }
            if (txtAP.Text.Trim().Length != 0)
            {
                oAlumnoBO.Apellidopaterno = txtAP.Text.Trim();
            }
            if (txtAM.Text.Trim().Length != 0)
            {
                oAlumnoBO.Apellidomaterno = txtAM.Text.Trim();
            }
            if (txtGrado.Text.Trim().Length != 0)
            {
                oAlumnoBO.Grado = Convert.ToInt32(txtGrado.Text.Trim());
            }
            if (txtGrupo.Text.Trim().Length != 0)
            {
                oAlumnoBO.Grupo = txtGrupo.Text.Trim();
            }
            dsReporte = oAlumnoCtrl.devuelveAlumno(oAlumnoBO);
            dgvAlumno.AutoGenerateColumns = false;
            dgvAlumno.DataSource          = dsReporte.Tables[0];
        }
        public void modificar()
        {
            string mensaje = "";

            if (txtNombre.Text.Trim().Length == 0)
            {
                mensaje = mensaje + "Introduce el Nombre \n";
            }
            if (txtAM.Text.Trim().Length == 0)
            {
                mensaje = mensaje + "Introduce el Apellido Materno \n";
            }
            if (txtAP.Text.Trim().Length == 0)
            {
                mensaje = mensaje + "Introduce el Apellido Paterno \n";
            }
            if (txtDireccion.Text.Trim().Length == 0)
            {
                mensaje = mensaje + "Introduce la Dirección \n";
            }
            if (txtTelefono.Text.Trim().Length == 0)
            {
                mensaje = mensaje + "Introduce el Teléfono \n";
            }
            if (txtGrado.Text.Trim().Length == 0)
            {
                mensaje = mensaje + "Introduce el Grado \n";
            }
            if (txtGrupo.Text.Trim().Length == 0)
            {
                mensaje = mensaje + "Introduce el Grupo \n";
            }

            if (mensaje.Trim().Length == 0)
            {
                AlumnoBO   oAlumnoBO   = new AlumnoBO();
                AlumnoCtrl oAlumnoCtrl = new AlumnoCtrl();
                oAlumnoBO.Matricula       = Convert.ToInt32(txtMatricula.Text.Trim());
                oAlumnoBO.Nombre          = txtNombre.Text.Trim();
                oAlumnoBO.Apellidopaterno = txtAP.Text.Trim();
                oAlumnoBO.Apellidomaterno = txtAM.Text.Trim();
                oAlumnoBO.Direccion       = txtDireccion.Text.Trim();
                oAlumnoBO.Telefono        = txtTelefono.Text.Trim();
                oAlumnoBO.Grado           = Convert.ToInt32(txtGrado.Text.Trim());
                oAlumnoBO.Grupo           = txtGrupo.Text.Trim();
                oAlumnoCtrl.modificaAlumno(oAlumnoBO);
                MessageBox.Show("El alumno se modifico correctamete");
            }
            else
            {
                MessageBox.Show("Favor de ingresar los siguientes datos:\n" + mensaje);
            }
        }
        public void eliminar()
        {
            AlumnoBO   oAlumnoBO   = new AlumnoBO();
            AlumnoCtrl oAlumnoCtrl = new AlumnoCtrl();

            oAlumnoBO.Matricula = Convert.ToInt32(txtMatricula.Text.Trim());
            int i = oAlumnoCtrl.eliminaAlumno(oAlumnoBO);

            if (i == 1)
            {
                MessageBox.Show("Los datos se eliminaron correctamente");
            }
            else
            {
                MessageBox.Show("Los datos no se eliminaron, intenta de nuevo");
            }
        }
        public void buscar(AlumnoBO oAlumno)
        {
            //AlumnoBO oAlumnoBO = new AlumnoBO();
            AlumnoCtrl oAlumnoCtrl = new AlumnoCtrl();
            DataTable  dt          = oAlumnoCtrl.devuelveAlumno(oAlumno).Tables[0];

            if (dt.Rows.Count != 0)
            {
                txtAM.Text        = dt.Rows[0]["ApellidoMaterno"].ToString();
                txtAP.Text        = dt.Rows[0]["ApellidoPaterno"].ToString();
                txtDireccion.Text = dt.Rows[0]["Direccion"].ToString();
                txtGrado.Text     = dt.Rows[0]["Grado"].ToString();
                txtGrupo.Text     = dt.Rows[0]["Grupo"].ToString();
                txtMatricula.Text = dt.Rows[0]["Matricula"].ToString();
                txtNombre.Text    = dt.Rows[0]["Nombre"].ToString();
                txtTelefono.Text  = dt.Rows[0]["Telefono"].ToString();
            }
            else
            {
                this.Close();
            }
        }