示例#1
0
        public void TabTest()
        {
            Tournament  tournament = Tournament.Parse(File.ReadAllText("E:\\Tournament\\tara.trn"));
            SqlHelper   helper     = new SqlHelper(tournament.Database);
            DataContext context    = helper.GetDataContext().Result;

            MicrosoftHelper.WriteTabSoFar(tournament, context, 1);
        }
示例#2
0
        public void BallotTest()
        {
            Tournament  tournament = Tournament.Parse(File.ReadAllText("E:\\Tournament\\tara.trn"));
            SqlHelper   helper     = new SqlHelper(tournament.Database);
            DataContext context    = helper.GetDataContext().Result;
            Round       round      = helper.GetRounds().Result.First();

            MicrosoftHelper.CreateBallots(tournament, context, round.RoundId);
        }
示例#3
0
        private void RerunBallots()
        {
            if (_currentlySelectedRound == null)
            {
                return;
            }

            DialogResult result = MessageBox.Show("Do you want to rerun the ballots for Round " + _currentlySelectedRound.RoundNumber + "?", "Rerun Ballots", MessageBoxButtons.YesNo);

            if (result == DialogResult.Yes)
            {
                MicrosoftHelper.CreateBallots(_tournament, _context, _currentlySelectedRound.RoundId);
                MicrosoftHelper.CreateOverview(_tournament, _context, _currentlySelectedRound.RoundId);
                MicrosoftHelper.CreateRotation(_tournament, _context, _currentlySelectedRound.RoundNumber);
                HtmlHelper.CreateDisplay(_tournament, _context, _currentlySelectedRound.RoundId);
                MessageBox.Show("Ballots have been rerun!");
            }
        }