private void GenerateRanking(int programNumber) { ParticipationDescription p = _sdk.ParticipationDescriptions.GetAll().SingleOrDefault(x => x.ProgramNumber == programNumber.ToString()); if (p != null) { RankingType rankingType; bool success = Enum.TryParse(p.RankingType, out rankingType); if (success) { RankingConfiguration config = new RankingConfigurationBuilder(programNumber, rankingType); RankingReportBuilder reportBuilder = new RankingReportBuilder(config); RankingReport report = reportBuilder.Build(); RankItems = new ObservableCollection<RankItem>(report.GetOrderedRankItems()); } } }
private void GenerateRanking(int programNumber) { ParticipationDescription p = _sdk.ParticipationDescriptions.GetAll().SingleOrDefault(x => x.ProgramNumber == programNumber.ToString()); if (p != null) { RankingType rankingType; bool success = Enum.TryParse(p.RankingType, out rankingType); if (success) { RankingConfiguration config = new RankingConfigurationBuilder(programNumber, rankingType); RankingReportBuilder reportBuilder = new RankingReportBuilder(config); RankingReport report = reportBuilder.Build(); RankItems = new ObservableCollection <RankItem>(report.GetOrderedRankItems()); } } }