private void btnImportar_Click(object sender, EventArgs e) { if(ofdImportar.ShowDialog() == DialogResult.OK) { try { var logica = new NegocioAlumno(); logica.Importar(ofdImportar.FileName); MessageBox.Show(this, "Importado correctamente"); Listar.PerformClick(); } catch(Exception ex) { MessageBox.Show(this, ex.Message); } } }
private void btnExportar_Click(object sender, EventArgs e) { try { var logica = new NegocioAlumno(); logica.Exportar(logica.ListarAlumno()); } catch(Exception ex) { MessageBox.Show(this, ex.Message); } }