diff options
author | MichaĆ Zimniewicz <michzimny@users.noreply.github.com> | 2018-01-04 01:19:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-04 01:19:50 +0100 |
commit | fa8e46acc24c5cf8b607531684b4c9858e4ebb33 (patch) | |
tree | b81ddbc9cef517446232e007b9e287152e504235 /Aktywator/Bws.cs | |
parent | 80cd31c1c8e7cef2cfbf6148df3d9ec2d2a23279 (diff) | |
parent | f58213dbf8b1d52f9545a7c3b227cff59a888afb (diff) |
Merge pull request #36 from michzimny/1.1-betav1.1.3
v1.1.3
Diffstat (limited to 'Aktywator/Bws.cs')
-rw-r--r-- | Aktywator/Bws.cs | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/Aktywator/Bws.cs b/Aktywator/Bws.cs index 9dedb84..e589418 100644 --- a/Aktywator/Bws.cs +++ b/Aktywator/Bws.cs @@ -624,10 +624,7 @@ namespace Aktywator while (d.Read()) { - if ("*".Equals(section)) - { - section = this.getBWSNumber(d, 0).ToString(); - } + string pairSection = "*".Equals(section) ? this.getBWSNumber(d, 0).ToString() : section; string table = this.getBWSNumber(d, 1).ToString(); int ns = this.getBWSNumber(d, 2); int ew = this.getBWSNumber(d, 3); @@ -638,14 +635,14 @@ namespace Aktywator { throw new KeyNotFoundException(ns.ToString()); } - countNew += updateName(section, table, "N", names[ns][0]); - countNew += updateName(section, table, "S", names[ns][1]); + countNew += updateName(pairSection, table, "N", names[ns][0]); + countNew += updateName(pairSection, table, "S", names[ns][1]); count += 2; if (tournament.type == Tournament.TYPE_TEAMY) { - countNew += updateName(section, (int.Parse(table) + SKOK_STOLOW).ToString(), "E", + countNew += updateName(pairSection, (int.Parse(table) + SKOK_STOLOW).ToString(), "E", names.ContainsKey(ns + TeamNamesSettings.OpenClosedDiff) ? names[ns + TeamNamesSettings.OpenClosedDiff][0] : names[ns][0]); - countNew += updateName(section, (int.Parse(table) + SKOK_STOLOW).ToString(), "W", + countNew += updateName(pairSection, (int.Parse(table) + SKOK_STOLOW).ToString(), "W", names.ContainsKey(ns + TeamNamesSettings.OpenClosedDiff) ? names[ns + TeamNamesSettings.OpenClosedDiff][1] : names[ns][1]); count += 2; } @@ -667,14 +664,14 @@ namespace Aktywator { throw new KeyNotFoundException(ew.ToString()); } - countNew += updateName(section, table, "E", names[ew][0]); - countNew += updateName(section, table, "W", names[ew][1]); + countNew += updateName(pairSection, table, "E", names[ew][0]); + countNew += updateName(pairSection, table, "W", names[ew][1]); count += 2; if (tournament.type == Tournament.TYPE_TEAMY) { - countNew += updateName(section, (int.Parse(table) + SKOK_STOLOW).ToString(), "N", + countNew += updateName(pairSection, (int.Parse(table) + SKOK_STOLOW).ToString(), "N", names.ContainsKey(ns + TeamNamesSettings.OpenClosedDiff) ? names[ew + TeamNamesSettings.OpenClosedDiff][0] : names[ew][0]); - countNew += updateName(section, (int.Parse(table) + SKOK_STOLOW).ToString(), "S", + countNew += updateName(pairSection, (int.Parse(table) + SKOK_STOLOW).ToString(), "S", names.ContainsKey(ns + TeamNamesSettings.OpenClosedDiff) ? names[ew + TeamNamesSettings.OpenClosedDiff][1] : names[ew][1]); count += 2; } |