-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dmCoach.pas
74 lines (57 loc) · 1.64 KB
/
dmCoach.pas
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
unit dmCoach;
interface
uses
System.SysUtils, System.Classes, FireDAC.Stan.Intf, FireDAC.Stan.Option,
FireDAC.Stan.Error, FireDAC.UI.Intf, FireDAC.Phys.Intf, FireDAC.Stan.Def,
FireDAC.Stan.Pool, FireDAC.Stan.Async, FireDAC.Phys, FireDAC.VCLUI.Wait,
Data.DB, FireDAC.Comp.Client, FireDAC.Phys.MSSQL, FireDAC.Phys.MSSQLDef,
FireDAC.Stan.Param, FireDAC.DatS, FireDAC.DApt.Intf, FireDAC.DApt,
FireDAC.Comp.DataSet;
type
TCOACH = class(TDataModule)
coachConnection: TFDConnection;
qrySession: TFDQuery;
qryWorkOut: TFDQuery;
dsSession: TDataSource;
dsWorkOut: TDataSource;
qrySwimmerLink: TFDQuery;
qryCoachLink: TFDQuery;
dsSwimmerLink: TDataSource;
dsCoachLink: TDataSource;
procedure DataModuleCreate(Sender: TObject);
private
{ Private declarations }
fCoreTablesActivated: boolean;
public
{ Public declarations }
// SYSTEM - STARTUP - EXIT
procedure ActivateTable();
procedure DeActivateTable();
// FLAG - true if all core FireDAC tables, queries are active.
property CoreTablesActivated: boolean read fCoreTablesActivated;
end;
const
CUSTOMINIFILE = 'SCMCoachPref.ini';
USEDEFAULTINIFILE = true; // NOTE: Always true. 26/09/2022
SCMCONFIGFILENAME = 'SCMCoachConfig.ini';
var
COACH: TCOACH;
implementation
{%CLASSGROUP 'Vcl.Controls.TControl'}
{$R *.dfm}
uses
System.IOUtils, IniFiles, SCMUtility;
{ TSCM }
procedure TCOACH.ActivateTable;
begin
fCoreTablesActivated := true;
end;
procedure TCOACH.DataModuleCreate(Sender: TObject);
begin
// TODO: INIT SCM datamodule
end;
procedure TCOACH.DeActivateTable;
begin
fCoreTablesActivated := false;
end;
end.