Rabu, 30 Juli 2014

Membuat Aplikasi Gaji Karyawan Di Delphi 7.0

membuat aplikasi gaji karyawan..
berikut source code nya.. comoot gan
var
Form1: TForm1;
gp, tj, ta, tl : real;
implementation
uses Math;
{$R *.dfm}
procedure TForm1.ComboBox 1Change
(Sender: TObject);
begin
case ComboBox1.ItemI ndex of
0 : Label2x.Caption := 'Agus';
1 : Label2x.Caption := 'Amin';
2 : Label2x.Caption := 'Anwar';
3 : Label2x.Caption := 'Asep';
end;
end;
procedure TForm1.CheckBox 1Click(Sender:
TObject);
begin
Edit1.Enabled := CheckBox1.Check ed;
if CheckBox1.Check ed = False then
Edit1.Text := '0';
end;
procedure TForm1.Button1C lick(Sender:
TObject);
begin
If RadioButton1.Ch ecked then gp := 900000;
if RadioButton2.Ch ecked then gp :=
1100000;
If RadioButton3.Ch ecked then gp :=
1400000;
if CheckBox1.Check ed = true then tj := 0.2 *
gp
else tj := 0.05 * gp;
if StrToInt(Edit1. Text)>= 3 then
ta := gp * 0.3
else
ta := gp * 0.1 * StrToInt(Edit1. Text);
tl := gp + tj + ta;
ListBox1.Items. Clear;
ListBox1.Items. Add('Gaji Pokok :
'+formatcurr('R p '+'###,##0',gp) );
ListBox1.Items. Add('Tunj. Kel : '+formatcurr
('R p '+'###,##0',tj) );
ListBox1.Items. Add('Tunj. Anak :
'+formatcurr('R p '+'###,##0',ta) );
ListBox1.Items. Add('==========
============');
ListBox1.Items. Add('Gaji Pokok :
'+formatcurr('R p '+'###,##0',tl) );
end;
end.

Tidak ada komentar:

Posting Komentar