async Task ExecuteLoadItemsCommand()
        {
            if (IsBusy)
            {
                return;
            }

            IsBusy = true;

            try
            {
                Items.Clear();
                var items = await ClienteDatos.GetItemsAsync(1);

                foreach (var item in items)
                {
                    Items.Add(item);
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
            }
            finally
            {
                IsBusy = false;
            }
        }
예제 #2
0
        async Task ExecuteLoadItemsCommand()
        {
            if (IsBusy)
            {
                return;
            }

            IsBusy = true;

            try
            {
                DocumentoLista.Clear();
                Clientes.Clear();
                var items = await ClienteDatos.GetItemsAsync(true);

                foreach (var item in items)
                {
                    Clientes.Add(item);
                }


                var documentos = await DocumentoDatos.GetItemsAsync(this.IDTipoDocumento);

                foreach (var item in documentos)
                {
                    DocumentoLista.Add(item);
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
            }
            finally
            {
                IsBusy = false;
            }
        }