public override async void OnNavigatedTo(NavigationParameters parameters)
        {
            base.OnNavigatedTo(parameters);
            localDbTeams = await localDbService.GetAllTeamsAsync();

            if (parameters.ContainsKey("id"))
            {
                Team = localDbTeams.First(t => t.Id == (int)parameters["id"]).Name;
            }
        }
Ejemplo n.º 2
0
        public override async void OnNavigatingTo(NavigationParameters parameters)
        {
            base.OnNavigatingTo(parameters);
            var allTeams = await localDbService.GetAllTeamsAsync();

            if (allTeams != null)
            {
                Teams = new ObservableCollection <TeamViewModel>(allTeams.Select(TeamViewModel.GetViewModelFromEntity));
            }
        }
Ejemplo n.º 3
0
        public override async void OnNavigatedTo(NavigationParameters parameters)
        {
            base.OnNavigatedTo(parameters);
            localDbTeams = await localDbService.GetAllTeamsAsync();

            if (parameters.ContainsKey("id"))
            {
                var result = localDbTeams.FirstOrDefault(t => parameters["id"].ToString().Contains(t.Id.ToString()));
                FavoriteTeam = result != null? result.Name ?? string.Empty: string.Empty;
            }
        }
Ejemplo n.º 4
0
        private async Task LoadSurveysAsync()
        {
            var allTeams = await localDbService.GetAllTeamsAsync();

            var allSurveys = await localDbService.GetAllSurveysAsync();

            if (allSurveys != null)
            {
                Surveys = new ObservableCollection <SurveyViewModel>(allSurveys.Select(s => SurveyViewModel.GetViewModelFromEntity(s, allTeams)));
            }
            RaisePropertyChanged(nameof(IsEmpty));
        }