Exemple #1
0
        async Task ExecuteLoadItemsCommand()
        {
            if (IsBusy)
            {
                return;
            }

            IsBusy = true;

            try
            {
                Contactos.Clear();
                var items = await this.service.ObtenerContactos();

                foreach (var item in items)
                {
                    Contactos.Add(item);
                }
            }
            catch (Exception)
            {
                // Log errores
            }
            finally
            {
                IsBusy = false;
            }
        }
Exemple #2
0
        public void ReadContacts()
        {
            var contactos = Contact.ReadContacts();

            Contactos.Clear();
            foreach (var contacto in contactos)
            {
                Contactos.Add(contacto);
            }
        }
Exemple #3
0
        async Task ExecuteLoadItemsCommand()
        {
            if (IsBusy)
            {
                return;
            }

            IsBusy = true;

            try
            {
                Contactos.Clear();
                Contactos = await GeneradorContacto.CrearContactos();
            }
            catch (Exception ex)
            {
                // Log errores
            }
            finally
            {
                IsBusy = false;
            }
        }