Repository navigation
Expand file tree
/
Copy pathMainSrc.pas
More file actions
105 lines (91 loc) · 2.2 KB
/
Copy pathMainSrc.pas
File metadata and controls
105 lines (91 loc) · 2.2 KB
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
unit MainSrc;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.Menus, Vcl.ExtCtrls,JabatanFrm,
PegawaiFrm;
type
TForm1 = class(TForm)
MainMenu1: TMainMenu;
Form1: TMenuItem;
abelJabatan1: TMenuItem;
DataPegawai1: TMenuItem;
Exit1: TMenuItem;
Panel1: TPanel;
Panel2: TPanel;
Satker1: TMenuItem;
Setti1: TMenuItem;
Config2: TMenuItem;
Lock1: TMenuItem;
About1: TMenuItem;
N1: TMenuItem;
Exit2: TMenuItem;
procedure abelJabatan1Click(Sender: TObject);
procedure DataPegawai1Click(Sender: TObject);
procedure Satker1Click(Sender: TObject);
procedure Config2Click(Sender: TObject);
procedure FormShow(Sender: TObject);
private
{ Private declarations }
Procedure RefreshKoneksi;
public
{ Public declarations }
FormJabatan : TForm2;
FormPegawai : TForm3;
end;
var
Form1: TForm1;
implementation
uses Modulsrc, ConnFrm, SatkerFrm;
{$R *.dfm}
Procedure TForm1.RefreshKoneksi;
begin
with DM do
begin
if not MyConn.Connected then
begin
Myconn.Connected:=false;
Myconn.Connected:=true;
end;
if not (tbljabatan.Active) or not (tblsatker.Active) or not (tblpejabat.Active) then
begin
tbljabatan.Close;
tblsatker.Close;
tblpejabat.Close;
tbljabatan.Active:=true;
tblsatker.Active:=true;
tblpejabat.Active:=true;
end
end;
end;
procedure TForm1.abelJabatan1Click(Sender: TObject);
begin
if not Assigned(FormJabatan) then
begin
FormJabatan := TForm2.Create(Application, Panel2);
FormJabatan.Show;
Panel2.Height := Panel2.Height-1;
end;
end;
procedure TForm1.Config2Click(Sender: TObject);
begin
Form4.showmodal;
end;
procedure TForm1.DataPegawai1Click(Sender: TObject);
begin
if not Assigned(FormPegawai) then
begin
FormPegawai := TForm3.Create(Application, Panel2);
FormPegawai.Show;
Panel2.Height := Panel2.Height-1;
end;
end;
procedure TForm1.FormShow(Sender: TObject);
begin
RefreshKoneksi;
end;
procedure TForm1.Satker1Click(Sender: TObject);
begin
Frmsatker.showmodal;
end;
end.