summaryrefslogtreecommitdiff
path: root/Aktywator/Setting.cs
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2018-10-24 14:57:21 +0200
committeremkael <emkael@tlen.pl>2018-10-24 14:57:21 +0200
commit5b9b179e9623c8b6935976ac537b2f9a1996486a (patch)
tree8da92804841daeb24639b8b232ef5c3f40281aca /Aktywator/Setting.cs
parent68b73444035103941c45e24a96b05f6cf40334c9 (diff)
Scoring type configuration support
Fixes michzimny/aktywator#43
Diffstat (limited to 'Aktywator/Setting.cs')
-rw-r--r--Aktywator/Setting.cs13
1 files changed, 13 insertions, 0 deletions
diff --git a/Aktywator/Setting.cs b/Aktywator/Setting.cs
index 2cf1120..657c822 100644
--- a/Aktywator/Setting.cs
+++ b/Aktywator/Setting.cs
@@ -174,6 +174,19 @@ namespace Aktywator
}
}
+ public static void saveScoringType(Sql sql, int value, string section)
+ {
+ StringBuilder sb = new StringBuilder("UPDATE `Section` SET `ScoringType` = ");
+ sb.Append(value);
+ if (section != null)
+ {
+ sb.Append(" WHERE `ID` = ");
+ sb.Append(section);
+ }
+ sb.Append(";");
+ sql.query(sb.ToString());
+ }
+
public static void saveSectionGroups(Sql sql, bool value, int teamTableOffset = 0)
{
if (teamTableOffset == 0)