Selasa, 01 Maret 2016

Program honor guru menggunakan visual foxpro90

1.       Instal visual foxpro90 di computer

2.       Buka programnya,jangan lupa lokasikan dulu directory penyimpanan projecknya di menu tool >option>filelocation>default directory. Seperti pd gb berikut, lalu modfy>set default>ok


3.       Selanjutnya Buat nama project dan database. Namanya terserah anda
4.       Buat tabel dengan nama tbhonor spt gb berikut

5.       Buat form baru dan desain seperti yg terlihat di gb berikut

Untuk combo 3 dan 4 berfungsi untuk membuat nomor kode guru
Untuk combo1 berfungsi untuk menentukan jml jam mengajar
Untuk combo2 berfungsi untuk menentukan status jabatan diluar kbm
Cara setting combo dengan cara klikkanan lalu builder dan isian data di colom1sesuai dengan data yang dibutuhkan lihat gb





Dan ini hasil laporannya




Ini kode listingnya,silahkan dicopas
Code hitung
a = thisform.text3.Value
b = thisform.text5.Value
c = thisform.text6.Value
d = thisform.text7.Value
e = thisform.text8.Value
e = (a+b+c)-d
thisform.text8.Value=e

code batal

thisform.combo3.Value=" "
thisform.combo4.Value=" "
thisform.text2.Value=" "
thisform.text3.Value=0
thisform.text4.Value=" "
thisform.text5.Value=0
thisform.text6.Value=0
thisform.text7.Value=0
thisform.text8.Value=0
thisform.combo1.Value=" "
thisform.combo2.Value=" "
thisform.combo3.Enabled= .T.
thisform.combo4.Enabled= .T.

 code close
thisform.Release

code simpan

SELECT tbhonor

APPEND BLANK

replace kdguru WITH thisform.combo3.Value
 IF thisform.combo3.Value="01-20"
    thisform.combo4.Value="21-40"
    endif 
replace nama_guru WITH thisform.text2.Value
replace jml_jam WITH thisform.combo1.Value
replace jml_honor WITH thisform.text3.Value
replace tgl WITH thisform.text4.Value
replace koreksian WITH thisform.text5.Value
replace jabtan WITH thisform.combo2.Value
replace honor_jabatan WITH thisform.text6.Value
replace potongan WITH thisform.text7.Value
replace gaji_bersih WITH thisform.text8.Value

code hapus
delete
thisform.combo3.Value=""
thisform.combo4.Value=""
thisform.text2.Value=""
thisform.combo1.Value=""
thisform.text3.Value=""
thisform.text4.Value=""
thisform.text5.Value=""
thisform.combo2.Value=""
thisform.text6.Value=""
thisform.text7.Value=""
thisform.text8.Value=""
thisform.grid1.Refresh

code preview
REPORT FORM laporanguru.frx TO PRINTER preview

Code form1(activate)

SET DELETED ON
thisform.combo3.Value=" "
thisform.combo4.Value=" "
thisform.text2.Value=" "
thisform.combo1.Value=" "
thisform.text3.Value=0
thisform.text4.Value=" "
thisform.text5.Value=0
thisform.combo2.Value=" "
thisform.text6.Value=0
thisform.text6.Value=0
thisform.text7.Value=0
thisform.text8.Value=0
thisform.combo3.SetFocus()

code grid1(afterrowcolchange)

LPARAMETERS nColIndex
SELECT tbhonor
thisform.combo3.Value=kdguru
thisform.combo4.Value=kdguru
thisform.text2.Value=nama_guru
thisform.combo1.Value=jml_jam
thisform.text3.Value=jml_honor
thisform.text4.Value=tgl
thisform.text5.Value=koreksian
thisform.combo2.Value=jabtan
thisform.text6.Value=honor_jabatan
thisform.text7.Value=potongan
thisform.text8.Value=gaji_bersih
thisform.grid1.Refresh

mogs msnfaat
Mohon maaf bila ada kekurangan




Tidak ada komentar: