async Task ExecuteLoadItemsCommand() { if (IsBusy) { return; } IsBusy = true; try { Eventos.Clear(); var items = await DataStore.GetItemsAsync(true); foreach (var item in items) { Eventos.Add(item); } } catch (Exception ex) { Debug.WriteLine(ex); } finally { IsBusy = false; } }
async Task ExecuteLoadEventosCommand() { if (IsBusy) { return; } IsBusy = true; try { Eventos.Clear(); var items = await DataStore.GetEventosPorFecha(DateTime.Now.AddDays(-5), DateTime.Now); foreach (var item in items) { Eventos.Add(item); } } catch (Exception ex) { Debug.WriteLine(ex); } finally { IsBusy = false; } }