private async void LoadData() { LogicClient logicCliente = new LogicClient(); LogicPhone logicPhone = new LogicPhone(); try { cbClientes.DataSource = (await logicCliente.GetAll()).ToList(); cbPhones.DataSource = (await logicPhone.GetAll()).ToList(); } catch (Exception ex) { base.ShowError(ex.Message, "Cargar InformaciĆ³n."); } }
public async override void LoadData() { _logicClient = new LogicClient(); gridClientes.Rows.Clear(); try { IEnumerable <Cliente> listClientes = await _logicClient.GetAll(); foreach (Cliente c in listClientes) { // IdCliente | Apellido | Nombre // gridClientes.Rows.Add(c.Id, c.Apellido, c.Nombre); } } catch (LoggedException logex) { base.ShowError(logex.Message, "Cargar Modelos"); } catch (Exception ex) { base.ShowError(ex.Message, "Cargar Modelos"); } }