-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEditStore.pas
68 lines (56 loc) · 1.52 KB
/
EditStore.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 EditStore;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ComCtrls, Vcl.ToolWin, Vcl.DBCtrls,
Vcl.ExtCtrls, Vcl.StdCtrls, Vcl.Mask;
type
TFormEditStore = class(TForm)
GridPanel1: TGridPanel;
DBNavigator1: TDBNavigator;
ToolBar1: TToolBar;
ToolButton1: TToolButton;
ToolButton2: TToolButton;
ToolButton3: TToolButton;
ToolButton4: TToolButton;
ToolButton5: TToolButton;
Label1: TLabel;
DBEdit1: TDBEdit;
Label2: TLabel;
DBEdit2: TDBEdit;
Label3: TLabel;
DBEdit3: TDBEdit;
procedure FormKeyPress(Sender: TObject; var Key: Char);
procedure ToolButton1Click(Sender: TObject);
procedure ToolButton3Click(Sender: TObject);
procedure ToolButton5Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FormEditStore: TFormEditStore;
implementation
{$R *.dfm}
uses DM;
procedure TFormEditStore.FormKeyPress(Sender: TObject; var Key: Char);
begin
if (Key = #27) then
Close;
end;
procedure TFormEditStore.ToolButton1Click(Sender: TObject);
begin
if Application.MessageBox('Äîáàâèòü?','',MB_YESNO)=IDYES then
DMl.ADOQueryStore.Append;
end;
procedure TFormEditStore.ToolButton3Click(Sender: TObject);
begin
if Application.MessageBox('Óäàëèòü?','',MB_YESNO)=IDYES then
DMl.ADOQueryStore.Delete;
end;
procedure TFormEditStore.ToolButton5Click(Sender: TObject);
begin
DMl.ADOQueryStore.Post;
end;
end.