diff options
author | emkael <emkael@tlen.pl> | 2016-11-26 16:22:52 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2016-11-26 16:22:52 +0100 |
commit | 425192e081de10a7efaee8d508f7dd336d97987a (patch) | |
tree | 1fb466c8409a79697e87bb6e8e1052749d825db6 /Aktywator | |
parent | c640787558713fb219f297e423095e73604a1130 (diff) |
* refactoring various section list retrieving
Diffstat (limited to 'Aktywator')
-rw-r--r-- | Aktywator/Bws.cs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Aktywator/Bws.cs b/Aktywator/Bws.cs index 9c2df11..4822f43 100644 --- a/Aktywator/Bws.cs +++ b/Aktywator/Bws.cs @@ -59,12 +59,12 @@ namespace Aktywator settings.Add(new Setting("BM2ValidateLeadCard", main.xCheckLeadCard, this)); } - public string sectionsForHandRecords() + private string getSectionList(string table) { try { string s; - data d = sql.select("SELECT DISTINCT `Section` FROM HandRecord ORDER BY 1"); + data d = sql.select("SELECT DISTINCT `Section` FROM " + table + " ORDER BY 1"); d.Read(); s = d[0].ToString(); while (d.Read()) @@ -79,6 +79,17 @@ namespace Aktywator } } + public string getSections() + { + return this.getSectionList("RoundData"); + } + + + public string sectionsForHandRecords() + { + return this.getSectionList("HandRecord"); + } + public void runBCS() { string app = Common.ProgramFilesx86() + "\\Bridgemate Pro\\BMPro.exe"; |