Exemplo n.º 1
0
        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());
                }
            }
        }
Exemplo n.º 2
0
        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());
                }
            }
        }