public string GetCompetition() { CompetitionBL CBL = new CompetitionBL(); CompetitionModel CModel = new CompetitionModel(); return(CBL.GetCompetition(CModel)); }
//Load round public void LoadRound() { RoundBL RoundBL = new RoundBL(); Round Round = new Round(); CompetitionBL CompetitionBL = new CompetitionBL(); List<Competition> ListCompetition; ListCompetition = CompetitionBL.GetCompetition(); if (ListCompetition != null) { for (int i = 0; i < ListCompetition.Count; i++) { if (cmb_Competition.SelectedItem.ToString() == ListCompetition.ElementAt(i).NameCompetition) { Round.IDCompetition = ListCompetition.ElementAt(i).IDCompetition; idCompetition = ListCompetition.ElementAt(i).IDCompetition; nameCompetition = cmb_Competition.SelectedItem.ToString(); } } } //load commobox round List<Round> ListRound; ListRound = RoundBL.GetRoundByIDCompetition(Round); if (ListRound != null) { for (int i = 0; i < ListRound.Count; i++) { cmb_Round.Items.Add(ListRound.ElementAt(i).NameRound); } } if (cmb_Round.Items.Count > 0) { cmb_Round.SelectedIndex = 0; } }
//Load Competition public void LoadCompetition() { CompetitionBL CompetitionBL = new CompetitionBL(); List<Competition> ListCompetition; ListCompetition = CompetitionBL.GetCompetition(); if (ListCompetition != null) { for (int i = 0; i < ListCompetition.Count; i++) { cmb_Competition.Items.Add(ListCompetition.ElementAt(i).NameCompetition); } } if (cmb_Competition.Items.Count > 0) { cmb_Competition.SelectedIndex = 0; } }