
procedure TForm2.Button1Click(Sender: TObject);
begin
if (user.Text='admin') AND (pass.Text='123456') then
begin
ShowMessage('Login berhasil');
Form1.Show;
end
else
begin
ShowMessage('Peiksa kembali user danpassword');
user.Text:='';
pass.Text:='';
user.SetFocus;
end;
end;
procedure TForm2.userKeyPress(Sender: TObject; var Key: Char);
begin
if not(key=chr(13)) then exit;
pass.SetFocus;
end;
procedure TForm2.passKeyPress(Sender: TObject; var Key: Char);
begin
if not(key=chr(13)) then exit;
Button1.SetFocus;
end;
procedure TForm2.Button2Click(Sender: TObject);
begin
user.Text:='';
pass.Text:='';
end;
end.

procedure TForm1.Button3Click(Sender: TObject);
begin
close;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
tanggal.Caption:=FormatDateTime('dd-mm-yyyy',now)
end;
procedure TForm1.Button5Click(Sender: TObject);
begin
no.Text:='';
nip.Text:='';
nama.Text:='';
id.Text:='';
lblgol.Caption:='';
lblpangkat.Caption:='';
tj.Text:='';
gaji.Text:='';
mkn.Text:='';
ass.Text:='';
bank.Text:='';
smb.Text:='';
koprasi.Text:='';
ass.Text:='';
akhir.Caption:='';
end;
procedure TForm1.namaKeyPress(Sender: TObject; var Key: Char);
begin
if not(key in['A'..'Z','a'..'z',#8,#13]) then
begin
key:=#0;
end
else if key=#13 then
begin
id.SetFocus;
end;
end;
procedure TForm1.noKeyPress(Sender: TObject; var Key: Char);
begin
if not(key=chr(13)) then exit;
if no.Text='' then
begin
ShowMessage('Isi telebih dahulu');
no.Text:='';
no.SetFocus;
end;
nip.SetFocus;
end;
procedure TForm1.nipKeyPress(Sender: TObject; var Key: Char);
begin
if not(key=chr(13)) then exit;
nama.SetFocus;
end;
procedure TForm1.arsKeyPress(Sender: TObject; var Key: Char);
var a,b,c,d,e,f,g,h,i,j:real;
begin
if not(key=chr(13)) then exit;
a:=StrToFloat(ass.text);
b:=StrToFloat(bank.Text);
c:=StrToFloat(smb.Text);
d:=StrToFloat(koprasi.Text);
e:=StrToFloat(ars.Text);
f:=StrToFloat(ptg.Text);
f:=(a+b+c+d+e);
g:=StrToFloat(gaji.Text);
h:=StrToFloat(tj.Text);
i:=StrToFloat(mkn.Text);
j:=StrToFloat(akhir.Caption);
j:=(g+h+i)-f;
ass.Text:=FloatToStr(a);
bank.Text:=FloatToStr(b);
smb.Text:=FloatToStr(c);
koprasi.Text:=FloatToStr(d);
ars.Text:=FloatToStr(e);
ptg.Text:=FloatToStr(f);
gaji.Text:=FloatToStr(g);
tj.Text:=FloatToStr(h);
mkn.Text:=FloatToStr(i);
akhir.Caption:=FloatToStr(j);
end;
procedure TForm1.assKeyPress(Sender: TObject; var Key: Char);
begin
if not(key=chr(13)) then exit;
bank.SetFocus;
end;
procedure TForm1.bankKeyPress(Sender: TObject; var Key: Char);
begin
if not(key=chr(13)) then exit;
smb.SetFocus;
end;
procedure TForm1.koprasiKeyPress(Sender: TObject; var Key: Char);
begin
if not(key=chr(13)) then exit;
ars.SetFocus;
end;
procedure TForm1.smbKeyPress(Sender: TObject; var Key: Char);
begin
if not(key=chr(13)) then exit;
koprasi.SetFocus;
end;
procedure TForm1.tjKeyPress(Sender: TObject; var Key: Char);
begin
if not(key=chr(13)) then exit;
mkn.SetFocus;
end;
procedure TForm1.mknKeyPress(Sender: TObject; var Key: Char);
begin
if not(key=chr(13)) then exit;
ass.SetFocus;
end;
procedure TForm1.idKeyPress(Sender: TObject; var Key: Char);
begin
if not(key=chr(13)) then exit;
if LeftStr(id.text,2)='01' then
begin
cb1.ItemIndex:=0;
end;
if LeftStr(id.text,2)='02' then
begin
cb1.ItemIndex:=1;
end;
if LeftStr(id.text,2)='03' then
begin
cb1.ItemIndex:=2;
end;
if LeftStr(id.text,2)='04' then
begin
cb1.ItemIndex:=3;
end;
if LeftStr(id.text,2)='05' then
begin
cb1.ItemIndex:=4;
end;
if LeftStr(id.text,2)='06' then
begin
cb1.ItemIndex:=5;
end;
if LeftStr(id.text,2)='07' then
begin
cb1.ItemIndex:=6;
end;
if LeftStr(id.text,2)='08' then
begin
cb1.ItemIndex:=7;
end;
if LeftStr(id.text,2)='09' then
begin
cb1.ItemIndex:=8;
end;
if LeftStr(id.text,2)='10' then
begin
cb1.ItemIndex:=9;
end;
if LeftStr(id.text,2)='11' then
begin
cb1.ItemIndex:=10;
end;
if LeftStr(id.text,2)='12' then
begin
cb1.ItemIndex:=11;
end;
if RightStr(id.Text,2)='2A' then
begin
lblgol.Caption:='IIA';
lblpangkat.Caption:='Pengatur Muda';
gaji.Text:='1714100';
tj.Text:='215000';
mkn.Text:='250000';
end;
if RightStr(id.Text,2)='2B' then
begin
lblgol.Caption:='IIB';
lblpangkat.Caption:='Guuru Pertama';
gaji.Text:='1871900';
tj.Text:='215000';
mkn.Text:='250000';
end;
if RightStr(id.Text,2)='2C' then
begin
lblgol.Caption:='IIC';
lblpangkat.Caption:='Pengatur';
gaji.Text:='1951100';
tj.Text:='215000';
mkn.Text:='250000';
end;
if RightStr(id.Text,2)='2D' then
begin
lblgol.Caption:='IID';
lblpangkat.Caption:='Pengatur TK.1';
gaji.Text:='2033600';
tj.Text:='215000';
mkn.Text:='250000';
end;
if RightStr(id.Text,2)='3A' then
begin
lblgol.Caption:='IIIA';
lblpangkat.Caption:='Penata Muda';
gaji.Text:='3590900';
tj.Text:='400000';
mkn.Text:='250000';
end;
if RightStr(id.Text,2)='3B' then
begin
lblgol.Caption:='IIIB';
lblpangkat.Caption:='Penata Muda Tk.1';
gaji.Text:='3742800';
tj.Text:='400000';
mkn.Text:='250000';
end;
if RightStr(id.Text,2)='3C' then
begin
lblgol.Caption:='IIIC';
lblpangkat.Caption:='Penata';
gaji.Text:='3901100';
tj.Text:='400000';
mkn.Text:='250000';
end;
if RightStr(id.Text,2)='3D' then
begin
lblgol.Caption:='IIID';
lblpangkat.Caption:='Penata Tk.1';
gaji.Text:='4066100';
tj.Text:='400000';
mkn.Text:='250000';
end;
if RightStr(id.Text,2)='4A' then
begin
lblgol.Caption:='IVA';
lblpangkat.Caption:='Pembina';
gaji.Text:='4238000';
tj.Text:='630000';
mkn.Text:='250000';
end;
if RightStr(id.Text,2)='4B' then
begin
lblgol.Caption:='IVB';
lblpangkat.Caption:='Pembina Tk.1';
gaji.Text:='4417400';
tj.Text:='630000';
mkn.Text:='250000';
end;
if RightStr(id.Text,2)='4C' then
begin
lblgol.Caption:='IVC';
lblpangkat.Caption:='Pembina Utama Muda';
gaji.Text:='4604200';
mkn.Text:='250000';
tj.Text:='630000';
end;
if RightStr(id.Text,2)='4D' then
begin
lblgol.Caption:='IVD';
lblpangkat.Caption:='Pembina Utama Madaya';
gaji.Text:='4799000';
tj.Text:='630000';
mkn.Text:='250000';
end;
ass.SetFocus;
end;
end.

procedure TForm2.Button1Click(Sender: TObject);
begin
if (user.Text='admin') AND (pass.Text='123456') then
begin
ShowMessage('Login berhasil');
Form1.Show;
end
else
begin
ShowMessage('Peiksa kembali user danpassword');
user.Text:='';
pass.Text:='';
user.SetFocus;
end;
end;
procedure TForm2.userKeyPress(Sender: TObject; var Key: Char);
begin
if not(key=chr(13)) then exit;
pass.SetFocus;
end;
procedure TForm2.passKeyPress(Sender: TObject; var Key: Char);
begin
if not(key=chr(13)) then exit;
Button1.SetFocus;
end;
procedure TForm2.Button2Click(Sender: TObject);
begin
user.Text:='';
pass.Text:='';
end;
end.

procedure TForm1.Button3Click(Sender: TObject);
begin
close;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
tanggal.Caption:=FormatDateTime('dd-mm-yyyy',now)
end;
procedure TForm1.Button5Click(Sender: TObject);
begin
no.Text:='';
nip.Text:='';
nama.Text:='';
id.Text:='';
lblgol.Caption:='';
lblpangkat.Caption:='';
tj.Text:='';
gaji.Text:='';
mkn.Text:='';
ass.Text:='';
bank.Text:='';
smb.Text:='';
koprasi.Text:='';
ass.Text:='';
akhir.Caption:='';
end;
procedure TForm1.namaKeyPress(Sender: TObject; var Key: Char);
begin
if not(key in['A'..'Z','a'..'z',#8,#13]) then
begin
key:=#0;
end
else if key=#13 then
begin
id.SetFocus;
end;
end;
procedure TForm1.noKeyPress(Sender: TObject; var Key: Char);
begin
if not(key=chr(13)) then exit;
if no.Text='' then
begin
ShowMessage('Isi telebih dahulu');
no.Text:='';
no.SetFocus;
end;
nip.SetFocus;
end;
procedure TForm1.nipKeyPress(Sender: TObject; var Key: Char);
begin
if not(key=chr(13)) then exit;
nama.SetFocus;
end;
procedure TForm1.arsKeyPress(Sender: TObject; var Key: Char);
var a,b,c,d,e,f,g,h,i,j:real;
begin
if not(key=chr(13)) then exit;
a:=StrToFloat(ass.text);
b:=StrToFloat(bank.Text);
c:=StrToFloat(smb.Text);
d:=StrToFloat(koprasi.Text);
e:=StrToFloat(ars.Text);
f:=StrToFloat(ptg.Text);
f:=(a+b+c+d+e);
g:=StrToFloat(gaji.Text);
h:=StrToFloat(tj.Text);
i:=StrToFloat(mkn.Text);
j:=StrToFloat(akhir.Caption);
j:=(g+h+i)-f;
ass.Text:=FloatToStr(a);
bank.Text:=FloatToStr(b);
smb.Text:=FloatToStr(c);
koprasi.Text:=FloatToStr(d);
ars.Text:=FloatToStr(e);
ptg.Text:=FloatToStr(f);
gaji.Text:=FloatToStr(g);
tj.Text:=FloatToStr(h);
mkn.Text:=FloatToStr(i);
akhir.Caption:=FloatToStr(j);
end;
procedure TForm1.assKeyPress(Sender: TObject; var Key: Char);
begin
if not(key=chr(13)) then exit;
bank.SetFocus;
end;
procedure TForm1.bankKeyPress(Sender: TObject; var Key: Char);
begin
if not(key=chr(13)) then exit;
smb.SetFocus;
end;
procedure TForm1.koprasiKeyPress(Sender: TObject; var Key: Char);
begin
if not(key=chr(13)) then exit;
ars.SetFocus;
end;
procedure TForm1.smbKeyPress(Sender: TObject; var Key: Char);
begin
if not(key=chr(13)) then exit;
koprasi.SetFocus;
end;
procedure TForm1.tjKeyPress(Sender: TObject; var Key: Char);
begin
if not(key=chr(13)) then exit;
mkn.SetFocus;
end;
procedure TForm1.mknKeyPress(Sender: TObject; var Key: Char);
begin
if not(key=chr(13)) then exit;
ass.SetFocus;
end;
procedure TForm1.idKeyPress(Sender: TObject; var Key: Char);
begin
if not(key=chr(13)) then exit;
if LeftStr(id.text,2)='01' then
begin
cb1.ItemIndex:=0;
end;
if LeftStr(id.text,2)='02' then
begin
cb1.ItemIndex:=1;
end;
if LeftStr(id.text,2)='03' then
begin
cb1.ItemIndex:=2;
end;
if LeftStr(id.text,2)='04' then
begin
cb1.ItemIndex:=3;
end;
if LeftStr(id.text,2)='05' then
begin
cb1.ItemIndex:=4;
end;
if LeftStr(id.text,2)='06' then
begin
cb1.ItemIndex:=5;
end;
if LeftStr(id.text,2)='07' then
begin
cb1.ItemIndex:=6;
end;
if LeftStr(id.text,2)='08' then
begin
cb1.ItemIndex:=7;
end;
if LeftStr(id.text,2)='09' then
begin
cb1.ItemIndex:=8;
end;
if LeftStr(id.text,2)='10' then
begin
cb1.ItemIndex:=9;
end;
if LeftStr(id.text,2)='11' then
begin
cb1.ItemIndex:=10;
end;
if LeftStr(id.text,2)='12' then
begin
cb1.ItemIndex:=11;
end;
if RightStr(id.Text,2)='2A' then
begin
lblgol.Caption:='IIA';
lblpangkat.Caption:='Pengatur Muda';
gaji.Text:='1714100';
tj.Text:='215000';
mkn.Text:='250000';
end;
if RightStr(id.Text,2)='2B' then
begin
lblgol.Caption:='IIB';
lblpangkat.Caption:='Guuru Pertama';
gaji.Text:='1871900';
tj.Text:='215000';
mkn.Text:='250000';
end;
if RightStr(id.Text,2)='2C' then
begin
lblgol.Caption:='IIC';
lblpangkat.Caption:='Pengatur';
gaji.Text:='1951100';
tj.Text:='215000';
mkn.Text:='250000';
end;
if RightStr(id.Text,2)='2D' then
begin
lblgol.Caption:='IID';
lblpangkat.Caption:='Pengatur TK.1';
gaji.Text:='2033600';
tj.Text:='215000';
mkn.Text:='250000';
end;
if RightStr(id.Text,2)='3A' then
begin
lblgol.Caption:='IIIA';
lblpangkat.Caption:='Penata Muda';
gaji.Text:='3590900';
tj.Text:='400000';
mkn.Text:='250000';
end;
if RightStr(id.Text,2)='3B' then
begin
lblgol.Caption:='IIIB';
lblpangkat.Caption:='Penata Muda Tk.1';
gaji.Text:='3742800';
tj.Text:='400000';
mkn.Text:='250000';
end;
if RightStr(id.Text,2)='3C' then
begin
lblgol.Caption:='IIIC';
lblpangkat.Caption:='Penata';
gaji.Text:='3901100';
tj.Text:='400000';
mkn.Text:='250000';
end;
if RightStr(id.Text,2)='3D' then
begin
lblgol.Caption:='IIID';
lblpangkat.Caption:='Penata Tk.1';
gaji.Text:='4066100';
tj.Text:='400000';
mkn.Text:='250000';
end;
if RightStr(id.Text,2)='4A' then
begin
lblgol.Caption:='IVA';
lblpangkat.Caption:='Pembina';
gaji.Text:='4238000';
tj.Text:='630000';
mkn.Text:='250000';
end;
if RightStr(id.Text,2)='4B' then
begin
lblgol.Caption:='IVB';
lblpangkat.Caption:='Pembina Tk.1';
gaji.Text:='4417400';
tj.Text:='630000';
mkn.Text:='250000';
end;
if RightStr(id.Text,2)='4C' then
begin
lblgol.Caption:='IVC';
lblpangkat.Caption:='Pembina Utama Muda';
gaji.Text:='4604200';
mkn.Text:='250000';
tj.Text:='630000';
end;
if RightStr(id.Text,2)='4D' then
begin
lblgol.Caption:='IVD';
lblpangkat.Caption:='Pembina Utama Madaya';
gaji.Text:='4799000';
tj.Text:='630000';
mkn.Text:='250000';
end;
ass.SetFocus;
end;
end.
05.04 |
Category: |
0
komentar
.jpg)
.jpg)
.jpg)
.jpg)
.jpg)
.jpg)
.jpg)
.jpg)






