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; } }
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; } }