コード例 #1
0
        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;
            }
        }
コード例 #2
0
        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;
            }
        }
コード例 #3
0
        public bool InsertEvento(Evento evento)
        {
            try
            {
                Eventos.Add(evento);
                return(true);
            }
            catch (Exception)
            {
                return(false);

                throw;
            }
        }
コード例 #4
0
        public async void GetEventos()
        {
            List <Event> events;

            try
            {
                events = await DataService.GetAllEventsAsync();

                foreach (var e in events)
                {
                    Eventos.Add(e);
                }
            }
            catch
            {
                throw;
            }
        }
コード例 #5
0
 public void AddCategory(CATEGORIA newCat)
 {
     Eventos.Add(newCat, new Dictionary <string, Evento>());
     EquiposX_categoria.Add(newCat, new List <Equipo>());
 }
コード例 #6
0
 public void ReceberEvento(Evento evento)
 {
     Eventos.Add(evento);
 }