-
Notifications
You must be signed in to change notification settings - Fork 1
/
ufrmCadPessoa.pas
68 lines (59 loc) · 2.03 KB
/
ufrmCadPessoa.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
unit ufrmCadPessoa;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, ufrmCadBase, cxGraphics, cxControls,
cxLookAndFeels, cxLookAndFeelPainters, dxRibbonCustomizationForm,
dxRibbonSkins, dxBarBuiltInMenu, cxStyles, cxCustomData, cxFilter, cxData,
cxDataStorage, cxEdit, cxNavigator, dxDateRanges, Data.DB, cxDBData,
cxButtonEdit, cxDropDownEdit, cxTextEdit, FireDAC.Stan.Intf,
FireDAC.Stan.Option, FireDAC.Stan.Param, FireDAC.Stan.Error, FireDAC.DatS,
FireDAC.Phys.Intf, FireDAC.DApt.Intf, FireDAC.Stan.Async, FireDAC.DApt,
cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
FireDAC.Comp.DataSet, FireDAC.Comp.Client, System.ImageList, Vcl.ImgList,
cxImageList, dxSkinsForm, dxBar, cxBarEditItem, cxClasses, cxGridLevel,
cxGridCustomView, cxGrid, cxPC, dxRibbon, cxContainer, cxDBEdit, cxMaskEdit,
cxSpinEdit, Vcl.StdCtrls, dxSkinsCore, dxSkinProject1;
type
TfrmCadPessoa = class(TfrmCadBase)
FDQueryID: TFDAutoIncField;
FDQueryNOME: TStringField;
FDQueryTELEFONE: TStringField;
FDQueryOBS: TStringField;
cxGridDBTableView1ID: TcxGridDBColumn;
cxGridDBTableView1NOME: TcxGridDBColumn;
cxGridDBTableView1TELEFONE: TcxGridDBColumn;
cxGridDBTableView1OBS: TcxGridDBColumn;
Label1: TLabel;
cxDBSpinEdit1: TcxDBSpinEdit;
Label2: TLabel;
cxDBTextEdit1: TcxDBTextEdit;
Label3: TLabel;
cxDBTextEdit2: TcxDBTextEdit;
Label4: TLabel;
cxDBTextEdit3: TcxDBTextEdit;
private
{ Private declarations }
public
procedure MontaQry; override;
end;
var
frmCadPessoa: TfrmCadPessoa;
implementation
{$R *.dfm}
{ TfrmCadPessoa }
procedure TfrmCadPessoa.MontaQry;
begin
inherited;
FDQuery.close;
with FDQuery.SQL do
begin
clear;
add('SELECT * FROM PESSOA');
if (cxPesquisa.EditValue = 'NOME') and (pesquisar.EditValue <> '') then
add('where nome like '+QuotedStr('%'+pesquisar.EditValue+'%'));
add('order by id desc')
end;
FDQuery.Open;
end;
end.