private void GetSelectedRound(Round selectedRound) { if (selectedRound == null) { return; } SelectedRound = selectedRound; CheckIfCorrected(); var questions = QuizRounds.First(r => r == selectedRound).RoundQuestions; TeamAnswersPerRound.Clear(); foreach (var answer in TeamAnswers) { foreach (var question in questions) { if (answer.AnswerQuestion.QuestionId == question.QuestionId) { TeamAnswersPerRound.Add(answer); } } } }
private void GetAnswersSelectedTeam(Team selectedTeam) { if (selectedTeam == null) { return; } SelectedTeam = selectedTeam; RoundsSelectionMode = "None"; RaisePropertyChanged(() => RoundsSelectionMode); TeamAnswersPerRound.Clear(); TeamAnswers.Clear(); selectedTeam.TeamAnswers.ToList().ForEach(a => { TeamAnswers.Add(a); }); RoundsSelectionMode = "Single"; RaisePropertyChanged(() => RoundsSelectionMode); }
private void NavigationService_Navigated(object sender, Windows.UI.Xaml.Navigation.NavigationEventArgs e) { FetchListOfEnabledTeams(); GetRoundsFromEnabledQuiz(); TeamAnswersPerRound.Clear(); }