From 425192e081de10a7efaee8d508f7dd336d97987a Mon Sep 17 00:00:00 2001 From: emkael Date: Sat, 26 Nov 2016 16:22:52 +0100 Subject: * refactoring various section list retrieving --- Aktywator/Bws.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'Aktywator') 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"; -- cgit v1.2.3