-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathunPrincipal.pas
87 lines (78 loc) · 2.17 KB
/
unPrincipal.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
75
76
77
78
79
80
81
82
83
84
85
86
87
unit unPrincipal;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Data.DB, Vcl.Grids, Vcl.DBGrids,
Vcl.ComCtrls, Vcl.StdCtrls, Data.Bind.EngExt, Vcl.Bind.DBEngExt, System.Rtti,
System.Bindings.Outputs, Vcl.Bind.Editors, Data.Bind.Components,
Data.Bind.DBScope, Vcl.DBActns, System.Actions, Vcl.ActnList;
type
TfrmPrincipal = class(TForm)
dbGridClientes: TDBGrid;
dbgridPedidos: TDBGrid;
GroupBox1: TGroupBox;
GroupBox2: TGroupBox;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Button1: TButton;
ActionList1: TActionList;
actInsertCliente: TDataSetInsert;
actDeleteCliente: TDataSetDelete;
actPostCliente: TDataSetPost;
actCancelarCliente: TDataSetCancel;
Button2: TButton;
Button3: TButton;
Button4: TButton;
actEditarCliente: TDataSetEdit;
Button5: TButton;
Button6: TButton;
Button7: TButton;
Button8: TButton;
Button9: TButton;
Button10: TButton;
actNovoPedido: TDataSetInsert;
actDeletePedido: TDataSetDelete;
actEditarPedido: TDataSetEdit;
actPostPedido: TDataSetPost;
actCancelarPedido: TDataSetCancel;
GroupBox3: TGroupBox;
Label4: TLabel;
DBGrid2: TDBGrid;
Button11: TButton;
Button12: TButton;
Button13: TButton;
Button14: TButton;
Button15: TButton;
actNovoProduto: TDataSetInsert;
actDeleteProduto: TDataSetDelete;
actEditarProduto: TDataSetEdit;
actSalvarProduto: TDataSetPost;
actCancelarProduto: TDataSetCancel;
actNovoProdutosPedido: TDataSetInsert;
Button16: TButton;
dbgridDetalhesPedido: TDBGrid;
Button17: TButton;
actExcluiProdutoPedido: TDataSetDelete;
procedure Button16Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frmPrincipal: TfrmPrincipal;
implementation
{$R *.dfm}
uses dm, unPedido;
procedure TfrmPrincipal.Button16Click(Sender: TObject);
begin
if frmPedido = nil then
frmPedido := TfrmPedido.Create(Self);
try
frmPedido.ShowModal;
finally
FreeAndNil(frmPedido);
end;
end;
end.