private void loadTournamentButton_Click(object sender, EventArgs e)
        {
            TournamentModel      selected_tourn = (TournamentModel)loadExistingTournamentDropDown.SelectedItem;
            TournamentViewerForm form           = new TournamentViewerForm(selected_tourn);

            form.Show();
        }
Example #2
0
        private void createTournamentButton_Click(object sender, EventArgs e)
        {
            if (!ValidateForm()) //Validate data
            {
                return;
            }

            TournamentModel tm = new TournamentModel(); //Create Tournament model

            tm.TournamentName = tournamentNameValue.Text;
            tm.EntryFee       = decimal.Parse(entryFeeValue.Text);



            tm.Prizes       = selectedPrizes; //Create all of the prizes entries
            tm.EnteredTeams = selectedTeams;  //Create all of team entries

            TournamentLogic.CreateRounds(tm); //Wire the matchups

            GlobalConfig.Connection.CreateTournament(tm);

            TournamentViewerForm form = new TournamentViewerForm(tm);

            form.Show();
            this.Close();
        }