Esempio n. 1
0
        private void buildCompetitions(S_User user)
        {
            List <S_Competition> competitions = CompetitionManager.GetCompetitionsByPlayer(user.id);


            _competitions  = "<div class='col-lg-8 col-lg-offset-2'>";
            _competitions += "  <h2>Jouw Competities</h2>";
            if (competitions.Count() > 0)
            {
                foreach (S_Competition competition in competitions)
                {
                    S_Challenge challenge = ChallengeManager.GetChallenge(competition.challengeid);
                    List <S_CompetitonBowlingcenter> competitonBowlingcenters = CompetitionManager.GetBowlingcentersByCompetition(competition.id);

                    _competitions += "  <h3>" + challenge.name + "</h3>";
                    _competitions += " <p> Van " + competition.startdate.ToString("dd-MM-yyyy") + " tot " + competition.enddate.ToString("dd-MM-yyyy") + " bij de volgende bowlingcentra: ";

                    foreach (S_CompetitonBowlingcenter competitonBowlingcenter in competitonBowlingcenters)
                    {
                        S_BowlingCenter bowlingCenter = BowlingCenterManager.GetBowlingCenterById(competitonBowlingcenter.bowlingcenterid);
                        _competitions += "<br/><br/>" + bowlingCenter.name;
                    }

                    _competitions += "</p>";
                }
            }
            else
            {
                _competitions += "  <p>Je doet nog niet mee aan een competitie</p>";
            }
            _competitions += "</div>";
        }