private void btnAgregar_Click(object sender, EventArgs e) { frmAlumno alumno = new frmAlumno(); alumno.ShowDialog(); if (alumno.DialogResult == DialogResult.OK) { cat.Alumnos.Add(alumno.mialumno); listUpdater(); } }
private void btnModificar_Click(object sender, EventArgs e) { if (lboxAlumno.SelectedItem != null) { frmAlumno alumno = new frmAlumno(cat.Alumnos[lboxAlumno.SelectedIndex]); alumno.ShowDialog(); if (alumno.DialogResult == DialogResult.OK) { cat.Alumnos[lboxAlumno.SelectedIndex] = alumno.mialumno; listUpdater(); } } }