Ejemplo n.º 1
0
        void llenarGrilla()
        {
            mgVer.Rows.Clear();
            int n = 0;
            BoletinComponent boletinComponent = new BoletinComponent();
            Curso            curso            = new Curso();

            curso = (Curso)txtCurso.SelectedItem;
            Boletin boletin = new Boletin(alumno);

            boletin.año = curso.salaHorario.año;

            foreach (var item in boletinComponent.ReadByAlumnoYAño(boletin))
            {
                n = mgVer.Rows.Add();

                mgVer.Rows[n].Cells[0].Value = item.Id;
                mgVer.Rows[n].Cells[1].Value = item.persona.nombre;
                mgVer.Rows[n].Cells[2].Value = item.persona.apellido;
                mgVer.Rows[n].Cells[3].Value = item.año;
                mgVer.Rows[n].Cells[4].Value = item.cutrimeste;
                mgVer.Rows[n].Cells[5].Value = item.notas;
                n++;
            }
        }
Ejemplo n.º 2
0
        private void btnAlta_Click(object sender, EventArgs e)
        {
            Alumno alumno = new Alumno();

            alumno = (Alumno)txtAlumno.SelectedItem;
            Boletin boletin = new Boletin(alumno);

            Curso curso = new Curso();

            curso              = (Curso)txtCurso.SelectedItem;
            boletin.año        = curso.salaHorario.año;
            boletin.cutrimeste = int.Parse(txtCuatrimestre.Text);
            boletin.notas      = txtNota.Text;
            BoletinComponent boletinComponent = new BoletinComponent();

            if (boletinComponent.Create(boletin) == null)
            {
                ValidadoresComponent.ErrorAltaModificacado("Boletin", this);
            }
            else
            {
                ValidadoresComponent.Alta("Boletin", this);
                llenarGrillaBoletin();
            }
        }
Ejemplo n.º 3
0
        private void btnBaja_Click(object sender, EventArgs e)
        {
            BoletinComponent boletinComponent = new BoletinComponent();

            boletinComponent.Delete(int.Parse(mgVer.CurrentRow.Cells[0].Value.ToString()));

            llenarGrillaBoletin();
        }
Ejemplo n.º 4
0
        private void btnVerBoletin_Click(object sender, EventArgs e)
        {
            PDFboletinComponent pDFboletinComponent = new PDFboletinComponent();
            Boletin             boletin             = new Boletin();
            BoletinComponent    boletinComponent    = new BoletinComponent();

            boletin = boletinComponent.ReadBy(int.Parse(mgVer.CurrentRow.Cells[0].Value.ToString()));
            pDFboletinComponent.AbrirPDF(boletin);
        }