예제 #1
0
        private void buttonStvori_turnir_Click(object sender, EventArgs e)
        {
            decimal fee;
            bool    feeAcceptable = decimal.TryParse(textBoxNagrada.Text, out fee);

            if (!feeAcceptable)
            {
                MessageBox.Show("Moraš upisati pravilnu kotizaciju", "Netočna kotizacija", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            TurnirModel tm = new TurnirModel();

            tm.TournamentName = ime_turn.Text;
            tm.EntryFee       = fee;
            tm.EntredTeams    = selectedTeams;

            foreach (NagradaModel prize in selectedPrizes)
            {
                tm.Prizes.Add(prize);
            }

            TournamentLogic.CreateRounds(tm);

            GlobalConfig.Connection.CreateTournament(tm);


            DashboardForm frm = new DashboardForm(tm);

            frm.Show();
            this.Close();
        }
예제 #2
0
        private void Zapocni_Click(object sender, EventArgs e)
        {
            TurnirModel   tm  = (TurnirModel)Izaberi.SelectedItem;
            DashboardForm frm = new DashboardForm(tm);

            frm.Show();
        }