diff options
author | emkael <emkael@tlen.pl> | 2018-04-15 11:16:38 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2018-04-15 11:17:05 +0200 |
commit | 914aacc61a1297786dc8c59a092674b023bf5180 (patch) | |
tree | 37bfcb9b71f31f297e8ff5b9783a18514b37a0f5 /Aktywator | |
parent | 40fd243fcbf38cb4bddf9337b2d8be5165dd3b22 (diff) |
BWS structure for hand records needs to be checked and created earlier on.v1.1.4.1
Diffstat (limited to 'Aktywator')
-rw-r--r-- | Aktywator/Bws.cs | 45 | ||||
-rw-r--r-- | Aktywator/Resources/BuildDate.txt | 2 |
2 files changed, 27 insertions, 20 deletions
diff --git a/Aktywator/Bws.cs b/Aktywator/Bws.cs index 15219f9..9121eb1 100644 --- a/Aktywator/Bws.cs +++ b/Aktywator/Bws.cs @@ -390,13 +390,14 @@ namespace Aktywator { } + this._ensureHandRecordStructure(); + try { - sql.query("CREATE TABLE HandRecord (`Section` integer, `Board` integer, " - + "NorthSpades text(13),NorthHearts text(13),NorthDiamonds text(13),NorthClubs text(13)," - + "EastSpades text(13),EastHearts text(13),EastDiamonds text(13),EastClubs text(13)," - + "SouthSpades text(13),SouthHearts text(13),SouthDiamonds text(13),SouthClubs text(13)," - + "WestSpades text(13),WestHearts text(13),WestDiamonds text(13),WestClubs text(13)" + sql.query("CREATE TABLE PlayData (" + + "`ID` autoincrement, `Section` integer, `Table` integer, `Round` integer, `Board` integer," + + "`Counter` integer, `Direction` text(2), `Card` text(10), `DateLog` datetime," + + "`TimeLog` datetime, `Erased` bit" + ");"); } catch (OleDbException) @@ -404,23 +405,26 @@ namespace Aktywator } try { - sql.query("CREATE TABLE HandEvaluation (`Section` integer, `Board` integer, " - + "NorthSpades integer,NorthHearts integer,NorthDiamonds integer,NorthClubs integer,NorthNotrump integer," - + "EastSpades integer,EastHearts integer,EastDiamonds integer,EastClubs integer,EastNotrump integer," - + "SouthSpades integer,SouthHearts integer,SouthDiamonds integer,SouthClubs integer,SouthNotrump integer," - + "WestSpades integer,WestHearts integer,WestDiamonds integer,WestClubs integer,WestNotrump integer," - + "NorthHcp integer,EastHcp integer,SouthHcp integer,WestHcp integer" + sql.query("CREATE TABLE BiddingData (" + + "`ID` autoincrement, `Section` integer, `Table` integer, `Round` integer, `Board` integer," + + "`Counter` integer, `Direction` text(2), `Bid` text(10), `DateLog` datetime," + + "`TimeLog` datetime, `Erased` bit" + ");"); } catch (OleDbException) { } + } + + private void _ensureHandRecordStructure() + { try { - sql.query("CREATE TABLE PlayData (" - + "`ID` autoincrement, `Section` integer, `Table` integer, `Round` integer, `Board` integer," - + "`Counter` integer, `Direction` text(2), `Card` text(10), `DateLog` datetime," - + "`TimeLog` datetime, `Erased` bit" + sql.query("CREATE TABLE HandRecord (`Section` integer, `Board` integer, " + + "NorthSpades text(13),NorthHearts text(13),NorthDiamonds text(13),NorthClubs text(13)," + + "EastSpades text(13),EastHearts text(13),EastDiamonds text(13),EastClubs text(13)," + + "SouthSpades text(13),SouthHearts text(13),SouthDiamonds text(13),SouthClubs text(13)," + + "WestSpades text(13),WestHearts text(13),WestDiamonds text(13),WestClubs text(13)" + ");"); } catch (OleDbException) @@ -428,10 +432,12 @@ namespace Aktywator } try { - sql.query("CREATE TABLE BiddingData (" - + "`ID` autoincrement, `Section` integer, `Table` integer, `Round` integer, `Board` integer," - + "`Counter` integer, `Direction` text(2), `Bid` text(10), `DateLog` datetime," - + "`TimeLog` datetime, `Erased` bit" + sql.query("CREATE TABLE HandEvaluation (`Section` integer, `Board` integer, " + + "NorthSpades integer,NorthHearts integer,NorthDiamonds integer,NorthClubs integer,NorthNotrump integer," + + "EastSpades integer,EastHearts integer,EastDiamonds integer,EastClubs integer,EastNotrump integer," + + "SouthSpades integer,SouthHearts integer,SouthDiamonds integer,SouthClubs integer,SouthNotrump integer," + + "WestSpades integer,WestHearts integer,WestDiamonds integer,WestClubs integer,WestNotrump integer," + + "NorthHcp integer,EastHcp integer,SouthHcp integer,WestHcp integer" + ");"); } catch (OleDbException) @@ -938,6 +944,7 @@ namespace Aktywator public bool detectDifferentRecordsInSections() { + this._ensureHandRecordStructure(); if (!this._differentRecordsDetected) { this._differentRecordsInSections = false; diff --git a/Aktywator/Resources/BuildDate.txt b/Aktywator/Resources/BuildDate.txt index 777043e..c370c3b 100644 --- a/Aktywator/Resources/BuildDate.txt +++ b/Aktywator/Resources/BuildDate.txt @@ -1 +1 @@ -2018-04-13 +2018-04-15 |