-
Notifications
You must be signed in to change notification settings - Fork 1
/
U_Module.pas
48 lines (39 loc) · 1.26 KB
/
U_Module.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
unit U_Module;
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.Phys.SQLite,
FireDAC.Phys.SQLiteDef, FireDAC.Stan.ExprFuncs, FireDAC.FMXUI.Wait,
FireDAC.Stan.Param, FireDAC.DatS, FireDAC.DApt.Intf, FireDAC.DApt, Data.DB,
FireDAC.Comp.DataSet, FireDAC.Comp.Client, System.ImageList, FMX.ImgList,
System.IOUtils;
type
Tmodule = class(TDataModule)
Q_ConsultaCardapio: TFDQuery;
db_driver: TFDPhysSQLiteDriverLink;
Connection: TFDConnection;
Q_CadastroProduto: TFDQuery;
ImageList1: TImageList;
ConsultaPreco: TFDQuery;
AtualizaProduto: TFDQuery;
DeletaItem: TFDQuery;
CarrinhoOperacoes: TFDQuery;
cadastra_pedido: TFDQuery;
Consulta_Pedidos: TFDQuery;
procedure ConnectionBeforeConnect(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
module: Tmodule;
implementation
{%CLASSGROUP 'FMX.Controls.TControl'}
{$R *.dfm}
procedure Tmodule.ConnectionBeforeConnect(Sender: TObject);
begin
Connection.Params.Values['Database'] := TPath.Combine(TPath.GetDocumentsPath, 'DataBase.db');
end;
end.