Exemple #1
0
        public void AddRankID(round round, Int64 id, judge_value value)
        {
            String judge_string = value == judge_value.A ? "a" : "b";
            String query        = String.Format("UPDATE rounds SET judge_{0}_ranks = {1} WHERE id = {2};", judge_string, id, round.id);

            using (SQLiteCommand command = new SQLiteCommand(query, connection))
            {
                command.ExecuteNonQuery();
            }
        }
Exemple #2
0
        public void AddScore(round round, Int64 team_a_score, Int64 team_b_score, judge_value value)
        {
            String judge_string = value == judge_value.A ? "a" : "b";
            String query        = String.Format("UPDATE rounds SET judge_{0}_score_team_a = {1} WHERE id = {2}", judge_string, team_a_score, round.id);

            using (SQLiteCommand command = new SQLiteCommand(query, connection))
            {
                command.ExecuteNonQuery();
            }
            String query2 = String.Format("UPDATE rounds SET judge_{0}_score_team_b = {1} WHERE id = {2}", judge_string, team_b_score, round.id);

            using (SQLiteCommand command = new SQLiteCommand(query2, connection))
            {
                command.ExecuteNonQuery();
            }
        }