Aplikasi Penggajian Pegawai Dengan Delphi 7

pada artikel ini saya akan menjelaskan tentang langkah-langkah dalam pembuatan aplikasi gaji pegawai menggunakan delphi

Pertama : Buatlah Form seperti gambar Berikut ! 


komponen yang di perlukan adalah sebagai berikut :
      1. label     --------- 5
      2. Textbox   --------- 1
      3.Combobox   --------- 1
      4.memo   --------- 1
      5.Buttons   --------- 2
      6.Checkbox --------- 1
      7. Radio Buttons ------- 3
      


CODE LENGKAP
========================================================================

var Form1: TForm1; gp, tj, ta, tl : real; implementation uses Math; {$R *.dfm} procedure TForm1.ComboBox1Change(Sender: TObject); begin case ComboBox1.ItemIndex of 0 : Label2x.Caption := 'Agus'; 1 : Label2x.Caption := 'Amin'; 2 : Label2x.Caption := 'Anwar'; 3 : Label2x.Caption := 'Asep'; end; end; procedure TForm1.CheckBox1Click(Sender: TObject); begin Edit1.Enabled := CheckBox1.Checked; if CheckBox1.Checked = False then Edit1.Text := '0'; end; procedure TForm1.Button1Click(Sender: TObject); begin If RadioButton1.Checked then gp := 900000; if RadioButton2.Checked then gp := 1100000; If RadioButton3.Checked then gp := 1400000; if CheckBox1.Checked = 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('Rp '+'###,##0',gp)); ListBox1.Items.Add('Tunj. Kel : '+formatcurr('Rp '+'###,##0',tj)); ListBox1.Items.Add('Tunj. Anak : '+formatcurr('Rp '+'###,##0',ta)); ListBox1.Items.Add('======================'); ListBox1.Items.Add('Gaji Pokok : '+formatcurr('Rp '+'###,##0',tl)); end; end.
========================================================================

masukan kode tersebut pada bagian button proses ! ingat untuk button reset kita cuma memasukan code seperti ini :
==============
edit1.Text := ' ';
edit2.Text := ' ';
end;
==============

nama "edit1." bisa di ganti sesuai name yang kalian edit di name delphi nya makasih semoga bermanfaat !! :) 


wassalam.wr.wb