Exemple #1
0
 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);
         }
     }
 }
Exemple #2
0
 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);
     }
 }