-
Notifications
You must be signed in to change notification settings - Fork 0
/
DataModuleUnit.h
42 lines (40 loc) · 1.98 KB
/
DataModuleUnit.h
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
//---------------------------------------------------------------------------
#ifndef DataModuleUnitH
#define DataModuleUnitH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ADODB.hpp>
#include <DB.hpp>
//---------------------------------------------------------------------------
class TDataModule1 : public TDataModule
{
__published: // IDE-managed Components
TADOConnection *ADOConnection;
TADOQuery *WeightADOQuery;
TADOQuery *AgeADOQuery;
TADOQuery *BeltADOQuery;
TADOQuery *PlayersADOQuery;
TADOQuery *ResultsADOQuery;
TADOQuery *TestADOQuery;
void __fastcall DataModuleCreate(TObject *Sender);
private: // User declarations
public: // User declarations
__fastcall TDataModule1(TComponent* Owner);
int GetWeights(TStringList *sl, AnsiString age); //ïîëó÷àåì ñïèñîê âåñîâûõ èç áàçû (îíè ñâÿçàíû ñ âîçðàñòîì)
int GetAges(TStringList *sl); //ïîëó÷àåì ñïèñîê âîçðàñòíûõ èç áàçû
int GetBelts(TStringList *sl); //ïîëó÷àåì ñïèñîê ïîÿñîâ èç áàçû
int GetInfoFromDB(TADOQuery *query, AnsiString fieldName ,TStringList *sl, AnsiString age = NULL); // îáùàÿ ïðîöåäóðà ïîëó÷åíèÿ äàííûõ èç ÁÄ
int GetNamesFromDB(TStringList *sl, AnsiString age, AnsiString belt, AnsiString weight); //ïîëó÷åíèå ñïèñêà èìåí áîðöîâ èç ÁÄ
int WriteResultsToDB(AnsiString pl1, AnsiString scores1, AnsiString pl2,
AnsiString scores2, AnsiString winner,
AnsiString winreason, AnsiString TimeToEnd,
AnsiString age, AnsiString belt, AnsiString weight); //çàïèñü ðåçóëüòàòîâ ñõâàòêè â ÁÄ
int TestDBConnection(); //òåñòèðîâàíèå ñîåäèíåíèÿ ñ ÁÄ
};
//---------------------------------------------------------------------------
extern PACKAGE TDataModule1 *DataModule1;
//---------------------------------------------------------------------------
#endif