Listing Delphi

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 7

Listing Delphi

unit Unit_HitungGaji;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, or!s,
"ialogs, StdCtrls, #$tCtrls;
type
%or!_HitungGaji & class'%or!(
)a*el+, %)a*el;
Grup_-a!a-./, %Group0o$;
)a*el1, %)a*el;
)a*el2, %)a*el;
%_-a!a, %#dit;
%_-./, %#dit;
Grup_Golongan, %3adioGroup;
Grup_4a*atan, %3adioGroup;
Grup_4a!5erja, %Group0o$;
)a*el6, %)a*el;
)a*el7, %)a*el;
%_4a!/erja, %#dit;
%_4a!)e!*ur, %#dit;
)a*el8, %)a*el;
)a*el9, %)a*el;
Grup_3inci, %Group0o$;
)a*el:, %)a*el;
)a*el;, %)a*el;
)a*el+<, %)a*el;
)a*el++, %)a*el;
3inci_=o5o5, %#dit;
3inci_4a*atan, %#dit;
3inci_)e!*ur, %#dit;
3inci_=aja5, %#dit;
Grup_total, %Group0o$;
)_%otal, %)a*el;
*t_0ersih, %0utton;
0t_Close, %0utton;
*t_Hitung, %0utton;
procedure Grup_GolonganClic5'Sender, %>*ject(;
procedure Grup_4a*atanClic5'Sender, %>*ject(;
procedure %_4a!/erjaChange'Sender, %>*ject(;
procedure *t_HitungClic5'Sender, %>*ject(;
procedure *t_0ersihClic5'Sender, %>*ject(;
procedure 0t_CloseClic5'Sender, %>*ject(;
pri?ate
@ =ri?ate declarations A
pu*lic
@ =u*lic declarations A
end;
?ar
or!_HitungGaji, %or!_HitungGaji;
=o5o5,4a*at,)e!*ur,%otal , currency;
i!ple!entation
@B3 CDdf!A
procedure %or!_HitungGajiDGrup_GolonganClic5'Sender, %>*ject(;
*egin
case Grup_golonganD.te!.nde$ of
< , =o5o5 ,& +17<<<<;
+ , =o5o5 ,& +7<<<<<;
1 , =o5o5 ,& +97<<<<;
end;
3inci_po5o5D%e$t ,& floattostr'po5o5(;
if Grup_4a*atanD.te!.nde$ E& < then
case Grup_4a*atanD.te!.nde$ of
< , 4a*at ,& <D+ C=o5o5;
+ , 4a*at ,& <D<7C=o5o5;
1 , 4a*at ,& <D<17C=o5o5;
end;
3inci_4a*atanD%e$t ,& floattostr'4a*at(;
end;
procedure %or!_HitungGajiDGrup_4a*atanClic5'Sender, %>*ject(;
*egin
case Grup_4a*atanD.te!.nde$ of
< , 4a*at ,& <D+ C=o5o5;
+ , 4a*at ,& <D<7C=o5o5;
1 , 4a*at ,& <D<17C=o5o5;
end;
3inci_4a*atanD%e$t ,& floattostr'4a*at(;
end;
procedure %or!_HitungGajiD%_4a!/erjaChange'Sender, %>*ject(;
?ar ja!5erja , integer;
*egin
if %_4a!5erjaD%e$t FE GG then
*egin
try
ja!5erja ,& strtoint'%_4a!5erjaD%e$t(;
if ja!5erja E& +8< then
*egin
%_4a!)e!*urD%e$t ,& inttostr'ja!5erjaH+8<(;
)e!*ur ,& 'ja!5erjaH+8<(C1<<<<;
3inci_)e!*urD%e$t ,& floattostr'le!*ur(;
end
else
*egin
%_4a!le!*urD%e$t ,& inttostr'<(;
)e!*ur ,& <;
3inci_)e!*urD%e$t ,& inttostr'<(;
end;
e$cept
*egin
show!essage'GSilah5an 5eti55an Ing5a sajaG(;
%_ja!5erjaD%e$t ,& GG;
end;
end;
end;
end;
procedure %or!_HitungGajiD*t_HitungClic5'Sender, %>*ject(;
*egin
3inci_=aja5D%e$t ,& floattostr'po5o5C <D<17(;
%otal ,& po5o5 J 4a*at J )e!*ur H'po5o5C<D<17(;
)_%otalDCaption ,& G3pD GJfloattostr'total,ff-u!*er,;,1(;
end;
procedure %or!_HitungGajiD*t_0ersihClic5'Sender, %>*ject(;
*egin
%_-a!aD%e$t ,& GG;
%_-./D%e$t ,& GG;
Grup_GolonganD.te!.nde$ ,& H+;
Grup_4a*atanD.te!.nde$ ,& H+;
%_4a!5erjaD%e$t ,& GG;
%_4a!le!*urD%e$t ,& GG;
3inci_=o5o5D%e$t ,& GG;
3inci_4a*atanD%e$t ,& GG;
3inci_)e!*urD%e$t ,& GG;
3inci_=aja5D%e$t ,& GG;
)_%otalDCaption ,& G3p DDDDG;
=o5o5,& <;
4a*at,& <;
)e!*ur,& <;
%otal,& <;
end;
procedure %or!_HitungGajiD0t_CloseClic5'Sender, %>*ject(;
*egin
selfDClose;
end;
endD

You might also like