blob: 3b83c8b6c4f3dc750adeb42670f298de982202b4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
using System;
using System.Collections.Generic;
using System.Text;
using MySql.Data.MySqlClient;
namespace Aktywator
{
class TeamyTournament : MySQLTournament
{
public TeamyTournament(string name)
: base(name)
{
}
override internal string getTypeLabel()
{
return "Teamy";
}
override public string getSectionsNum()
{
return "1";
}
override public string getTablesNum()
{
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;
}
}
}
|