private void addPlayedMatch(Match match1)
        {
            string type;

            if (cbBiltenType.SelectedItem == null)
            {
                MessageBox.Show("You must specify the type first!");
                return;
            }
            type = (string)cbBiltenType.SelectedItem;
            int number;

            if (type.Equals("1"))
            {
                number = 0;
            }
            else if (type.Equals("X"))
            {
                number = 1;
            }
            else
            {
                number = 2;
            }

            PlayedMatch playedMatch = new PlayedMatch(match1.MatchCode, match1.homeTeam, match1.awayTeam, match1.coef, number);

            if (lbTicket.Items.Contains(playedMatch))
            {
                MessageBox.Show("Already contains this match!");
                return;
            }

            lbTicket.Items.Add(playedMatch);
            totalCoefficient();
        }
Esempio n. 2
0
 public void addPlayedMatch(PlayedMatch played)
 {
     playedMatches.Add(played);
 }