Exemplo n.º 1
0
        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.");
            }
        }
Exemplo n.º 2
0
        public async override void LoadData()
        {
            _logicPhones = new LogicPhone();
            IEnumerable <Phone> listPhones;

            try
            {
                listPhones = await _logicPhones.GetAll();

                foreach (Phone p in listPhones)
                {
                    gridPhones.Rows.Add(p.Id, p.Modelo.Marca, p.Modelo.Nombre, p.Imei, p.Descripcion);
                }
            }
            catch (LoggedException loggex)
            {
                base.ShowError(loggex.Message, "Consultar Dispositivos.");
            }
        }