Example #1
0
        private void BtnAgregar_Click(object sender, EventArgs e)
        {
            FrmAlumno frm = new FrmAlumno();

            frm.ShowDialog();

            if (frm.DialogResult == DialogResult.OK)
            {
                if (this.catedra + frm.Alumno)
                {
                    //this.lstAlumnos.Items.Add(Alumno.Mostrar(frm.Alumno));
                    this.ActualizarListadoAlumnos();
                    this.btnCalificar.Enabled = true;
                }
                else
                {
                    MessageBox.Show("Error no se puede agregar el alumno");
                }
            }
        }
Example #2
0
        private void btnModificar_Click(object sender, EventArgs e)
        {
            int indice = this.lstAlumnos.SelectedIndex;

            if (indice >= 0)
            {
                FrmAlumno frm = new FrmAlumno(this.catedra.Alumnos[indice]);
                frm.ShowDialog();

                if (frm.DialogResult == DialogResult.OK)
                {
                    if (this.catedra - this.catedra.Alumnos[indice])
                    {
                        if (this.catedra + frm.Alumno)
                        {
                            this.ActualizarListadoAlumnos();
                            MessageBox.Show("Se ha hecho la modificacion correctamente");
                        }
                    }
                }
            }
        }