-
Notifications
You must be signed in to change notification settings - Fork 1
/
AddClient.pas
executable file
·58 lines (48 loc) · 1.11 KB
/
AddClient.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
unit AddClient;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ComCtrls, LinkedList,
Vcl.ExtCtrls;
type
TAddForm = class(TForm)
Label1: TLabel;
Button3: TButton;
Button4: TButton;
SurnameEdit: TLabeledEdit;
NameEdit: TLabeledEdit;
AddressEdit: TLabeledEdit;
NumberEdit: TLabeledEdit;
constructor LoadList(list : TLinkedList);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
List : TLinkedList;
public
{ Public declarations }
end;
var
AddForm: TAddForm;
implementation
{$R *.dfm}
constructor TAddForm.LoadList(list : TLinkedList);
begin
Self.List := list;
Create(nil);
end;
procedure TAddForm.Button1Click(Sender: TObject);
begin
try
List.Add(SurnameEdit.Text, NameEdit.Text, AddressEdit.Text, StrToInt(NumberEdit.Text));
Close;
except
ShowMessage('Wrong Data.');
end;
end;
procedure TAddForm.Button2Click(Sender: TObject);
begin
Close;
end;
end.