summaryrefslogtreecommitdiff
path: root/Aktywator/TeamyTournament.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Aktywator/TeamyTournament.cs')
-rw-r--r--Aktywator/TeamyTournament.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/Aktywator/TeamyTournament.cs b/Aktywator/TeamyTournament.cs
index 34908be..3b83c8b 100644
--- a/Aktywator/TeamyTournament.cs
+++ b/Aktywator/TeamyTournament.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Text;
+using MySql.Data.MySqlClient;
namespace Aktywator
{
@@ -26,5 +27,20 @@ namespace Aktywator
return this.mysql.selectOne("SELECT teamcnt FROM admin;");
}
+ override internal Dictionary<int, List<string>> getNameList()
+ {
+ Dictionary<int, List<String>> teams = new Dictionary<int, List<string>>();
+ MySqlDataReader dbData = this.mysql.select("SELECT id, fullname NAME FROM teams");
+ while (dbData.Read())
+ {
+ List<string> names = new List<string>();
+ names.Add(dbData.IsDBNull(1) ? "" : dbData.GetString(1));
+ names.Add("");
+ teams.Add(dbData.GetInt32(0), names);
+ }
+ dbData.Close();
+ return teams;
+ }
+
}
}