public ComisionDesktop() { PlanesLogic planesLogic = new PlanesLogic(); InitializeComponent(); planes = planesLogic.getAll(); foreach (Plan plan in planes) { cbPlan.Items.Add(plan); } }
public void listar() { PlanesLogic planesLogic = new PlanesLogic(); dgvPlanes.DataSource = null; try { dgvPlanes.DataSource = planesLogic.getAll(); } catch (Exception exc) { DialogResult result = MessageBox.Show(exc.Message, "Error", MessageBoxButtons.OK); } }