Exemplo n.º 1
0
        public async void LoadData()
        {
            try
            {
                _allNamedays = await NamedayRepository.GetAllNamedaysAsync();

                PerformFiltering();
                LoadingState = LoadingStates.Loaded;
            }
            catch
            {
                LoadingState = LoadingStates.Error;
            }

            var now = DateTime.Now;

            SelectedNameday = _allNamedays.FirstOrDefault(
                d => d.Day == now.Day && d.Month == now.Month);
        }
        private async void LoadData()
        {
            try
            {
                _allNamedays = await NamedayRepository.GetAllNamedaysAsync();

                PerformFiltering();
                LoadingState = LoadingStates.Loaded;
            }
            catch
            {
                LoadingState = LoadingStates.Error;
            }

            // get current nameday
            var now = DateTime.Now;

            SelectedNameday = _allNamedays.FirstOrDefault(n => n.Day == now.Day && n.Month == now.Month);
        }
Exemplo n.º 3
0
        public async void LoadData()
        {
            _allNamedays = await NamedayRepository.GetAllNamedaysAsync();

            PerformFiltering();
        }