-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathunitDM.pas
45 lines (36 loc) · 1.06 KB
/
unitDM.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
unit unitDM;
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.MySQL,
FireDAC.Phys.MySQLDef, FireDAC.VCLUI.Wait, FireDAC.Stan.Param, FireDAC.DatS,
FireDAC.DApt.Intf, FireDAC.DApt, Data.DB, FireDAC.Comp.DataSet,
FireDAC.Comp.Client;
type
TDM = class(TDataModule)
conexao: TFDConnection;
tbContatos: TFDTable;
dsContatos: TDataSource;
tbContatosid: TFDAutoIncField;
tbContatosnome: TStringField;
tbContatoscelular: TStringField;
tbContatosbloqueado: TBooleanField;
tbContatosdata: TDateTimeField;
tbContatosobservacoes: TMemoField;
procedure tbContatosAfterInsert(DataSet: TDataSet);
private
{ Private declarations }
public
{ Public declarations }
end;
var
DM: TDM;
implementation
{%CLASSGROUP 'Vcl.Controls.TControl'}
{$R *.dfm}
procedure TDM.tbContatosAfterInsert(DataSet: TDataSet);
begin
tbContatosdata.Value := Now();
end;
end.