204
4.5.4 Tampilan Bagian Lurah
Gambar 4.104 Tampilan Masukan Pada Bagian Lurah
Gambar 4.105 Tampilan Data Pegawai
205 Gambar 4.106 Tampilan Cetak Data Pegawai
Tabel 4.29 Listing Program Data Pegawai
Listing Program
Keterangan Private Sub btn_tambah_Click
aktif kosong
pil = tambah Text1.SetFocus
End Sub Private Sub btn_edit_Click
If Text1.Text = Then MsgBox Pilih dulu data yang akan anda
ubah Exit Sub
End If pil = ubah
Call aktif Text2.SetFocus
End Sub Private Sub btn_simpan_Click
If Text2.Text = Then MsgBox Nama Pegawai Harus diisi
Text2.SetFocus Exit Sub
End If If Text3.Text = Then
Text3.Text = - End If
Perintah untuk
menyimpan data
pegawai.
206 Tabel 4.30 Listing Program Data Pegawai Lanjutan 1
Listing Program
Keterangan If pil = tambah Then
rs_pegawai.AddNew End If
Call simpan End Sub
Private Sub btn_hapus_Click If Text1.Text = Then
MsgBox Pilih dulu data yang akan anda hapus
Exit Sub End If
With rs_pegawai .MoveFirst
.Find nip= Text1.Text , , adSearchForward
If Not .EOF Then .Delete
.MoveFirst Call kosong
Call tampil End If
End With End Sub
Perintah untuk
menyimpan data
pegawai.
Gambar 4.107 Tampilan Buku Inventaris
207 Gambar 4.108 Tampilan Cetak Laporan Buku Inventaris
Tabel 4.31 Listing Program Buku Inventaris Listing Program
Keterangan
Private Sub btn_simpan_Click If Text2.Text = Then
MsgBox Nama tanah Harus diisi Text2.SetFocus
Exit Sub End If
If Text3.Text = Then Text3.Text = -
End If With rs_bi
If Not .BOF Then .MoveFirst
.Find kode_barang= Text1.Text , , adSearchForward
If Not .EOF Then If pil = tambah Then
MsgBox Kode Tanah sudah pernah tersimpan
Exit Sub End If
End If End If
End With If pil = tambah Then
rs_bi.AddNew End If
Call simpan End Sub
Perintah untuk proses Buku
Inventaris.
208 Gambar 4.109 Tampilan SUPB
Gambar 4.110 Tampilan SUPSP
209
4.5.5 Tampilan Bagian PPTK
Gambar 4.111 Tampilan Masukan Pada Bagian PPTK
Gambar 4.112 Tampilan Data Mitra
Tabel 4.32 Listing Program Data Mitra
Listing Program
Keterangan Private Sub btn_tambah_Click
aktif kosong
pil = tambah Perintah untuk
menyimpan data mitra.
210 Tabel 4.33 Listing Program Data Mitra Lanjutan 1
Listing Program
Keterangan id
Text2.SetFocus End Sub
Private Sub btn_edit_Click If Text1.Text = Then
MsgBox Pilih dulu data yang akan anda ubah
Exit Sub End If
pil = ubah Call aktif
Text2.SetFocus End Sub
Private Sub btn_simpan_Click If Text2.Text = Then
MsgBox Nama Mitra Harus diisi Text2.SetFocus
Exit Sub End If
If Text3.Text = Then Text3.Text = -
End If If pil = tambah Then
rs_mitra.AddNew End If
Call simpan End Sub
Private Sub btn_hapus_Click If Text1.Text = Then
MsgBox Pilih dulu data yang akan anda hapus
Exit Sub End If
With rs_mitra .MoveFirst
.Find kode_mitra= Text1.Text , , adSearchForward
If Not .EOF Then .Delete
.MoveFirst Call kosong
Call tampil End If
End With End Sub
Perintah untuk menyimpan data mitra.
211 Gambar 4.113 Tampilan NPD
Tabel 4.34 Listing Program NPD
Listing Program
Keterangan Option Explicit
Sub kosong Text1.Text =
Text2.Text = Text3.Text =
Text4.Text = Text5.Text =
Text6.Text = Text7.Text = 0
Text8.Text = 0 Text9.Text = 0
strcari = pil =
Call isicomboCombo1, select from Table_SPM, rs_spm, 0
End Sub Sub aktif
Text1.Locked = False Text2.Locked = False
Text3.Locked = False Text4.Locked = False
Text5.Locked = False Text6.Locked = False
Text7.Locked = True Text8.Locked = True
Text9.Locked = True btn_tambah.Enabled = False
btn_simpan.Enabled = True btn_hapus.Enabled = False
End Sub Perintah untuk
proses NPD Nota Pencairan
Dana.
212 Tabel 4.35 Listing Program NPD Lanjutan 1
Listing Program
Keterangan Sub nonaktif
Text1.Locked = True Text2.Locked = True
Text3.Locked = True Text4.Locked = True
Text5.Locked = True Text6.Locked = True
Text7.Locked = True Text8.Locked = True
Text9.Locked = True btn_tambah.Enabled = True
btn_simpan.Enabled = False btn_hapus.Enabled = True
End Sub Sub hitung_jml
With rs_tampil .MoveFirst
While Not .EOF jml = jml + 1
.MoveNext Wend
End With End Sub
Sub isilv jml = 0
On Error Resume Next LV.ColumnHeaders.Clear
LV.ListItems.Clear Call hitung_jml
With LV .View = lvwReport
.FullRowSelect = True .ColumnHeaders.Add , , No NPD, 2000
.ColumnHeaders.Add , , Tanggal, 2000
.ColumnHeaders.Add , , Tahun, 1000 .ColumnHeaders.Add , , Program,
3000 .ColumnHeaders.Add , , Kegiatan,
3000 .ColumnHeaders.Add , , No DPA, 3000
.ColumnHeaders.Add , , Tahun Anggaran DPA, 3000
.ColumnHeaders.Add , , Jumlah Yang Diminta, 3000
.ColumnHeaders.Add , , Potongan, 2000
.ColumnHeaders.Add , , Jumlah Yang Dibayar, 3000
rs_tampil.MoveFirst For i = 1 To jml
.ListItems.Add i, , rs_tampil.Fields0
Perintah untuk proses NPD
Nota Pencairan Dana.
213 Tabel 4.36 Listing Program NPD Lanjutan 2
Listing Program
Keterangan For j = 1 To 3
.ListItemsi.ListSubItems.Add , , rs_tampil.Fields1
.ListItemsi.ListSubItems.Add , , rs_tampil.Fields2
.ListItemsi.ListSubItems.Add , , rs_tampil.Fields3
.ListItemsi.ListSubItems.Add , , rs_tampil.Fields4
.ListItemsi.ListSubItems.Add , , rs_tampil.Fields5
.ListItemsi.ListSubItems.Add , , rs_tampil.Fields6
.ListItemsi.ListSubItems.Add , , rs_tampil.Fields7
.ListItemsi.ListSubItems.Add , , rs_tampil.Fields8
.ListItemsi.ListSubItems.Add , , rs_tampil.Fields9
Next rs_tampil.MoveNext
Next End With
End Sub Sub preview
With rs_npd Text1.Text = .Fields0.Value
DTPicker1.Value = .Fields1.Value Text2.Text = .Fields2.Value
Text3.Text = .Fields3.Value Text4.Text = .Fields4.Value
Text5.Text = .Fields5.Value Text6.Text = .Fields6.Value
Text7.Text = .Fields7.Value Text8.Text = .Fields8.Value
Text9.Text = .Fields9.Value End With
End Sub Sub simpan
With rs_npd .Fields0.Value = Text1.Text
.Fields1.Value = DTPicker1.Value .Fields2.Value = Text2.Text
.Fields3.Value = Text3.Text .Fields4.Value = Text4.Text
.Fields5.Value = Text5.Text .Fields6.Value = Text6.Text
.Fields7.Value = Text7.Text .Fields8.Value = Text8.Text
.Fields9.Value = Text9.Text .Update
Call tampil Call nonaktif
Perintah untuk proses NPD
Nota Pencairan Dana.
214 Tabel 4.37 Listing Program NPD Lanjutan 3
Listing Program
Keterangan Call kosong
End With End Sub
Private Sub btn_cetak_Click On Error Resume Next
CR.ReportFileName = App.Path \report\Report_NPD.rpt
CR.SelectionFormula = {Table_NPD.no_npd}= Text1.Text
CR.RetrieveDataFiles CR.WindowState = crptMaximized
CR.Action = 1 End Sub
Private Sub btn_hapus_Click If Text1.Text = Then
MsgBox Pilih dulu data yang akan anda hapus
Exit Sub End If
With rs_npd .MoveFirst
.Find no_npd= Text1.Text , , adSearchForward
If Not .EOF Then .Delete
.MoveFirst Call kosong
Call tampil End If
End With End Sub
Private Sub btn_keluar_Click Call kosong
Unload Me End Sub
Private Sub btn_simpan_Click If Text2.Text = Then
MsgBox Tahun Anggaran Harus diisi Text2.SetFocus
Exit Sub End If
If pil = tambah Then rs_npd.AddNew
End If Call simpan
End Sub Private Sub btn_tambah_Click
aktif kosong
pil = tambah Perintah untuk
proses NPD Nota Pencairan
Dana.
215 Tabel 4.38 Listing Program NPD Lanjutan 4
Listing Program
Keterangan Text1.SetFocus
End Sub Private Sub Combo1_Click
st1 = LeftCombo1.Text, 5 st2 = RightCombo1.Text, 18
Text1.Text = st1 + NPD + st2 With rs_spm
.MoveFirst .Find no_spm= Combo1.Text , ,
adSearchForward If Not .EOF Then
Text7.Text = .Fields4.Value Text8.Text = .Fields5.Value
Text9.Text = .Fields6.Value End If
End With End Sub
Private Sub Form_Activate Text1.SetFocus
End Sub Sub tampil
st = select from Table_NPD If rs_tampil.State = 1 Then
rs_tampil.Close End If
rs_tampil.Open st, con, adOpenDynamic, adLockOptimistic
Call isilv End Sub
Private Sub Form_Load Move Screen.Width - Width 2,
Screen.Height - Height 2 st = select from Table_NPD
If rs_npd.State = 1 Then rs_npd.Close
End If rs_npd.Open st, con, adOpenDynamic,
adLockOptimistic Call tampil
Call kosong Call nonaktif
If jml = 0 Then btn_hapus.Enabled = False
End If End Sub
Private Sub Form_UnloadCancel As Integer strcari =
Perintah untuk proses NPD
Nota Pencairan Dana.
216 Tabel 4.39 Listing Program NPD Lanjutan 5
Listing Program
Keterangan pil =
End Sub Private Sub btn_batal_Click
Call kosong Call nonaktif
End Sub Private Sub LV_ItemClickByVal Item As
MSComctlLib.ListItem strcari = Item.Text
Call pencarian End Sub
Private Sub Text2_KeyPressKeyAscii As Integer
If KeyAscii = 13 Then btn_simpan.SetFocus
End If End Sub
Sub pencarian With rs_npd
If Not .BOF Then .MoveFirst
.Find no_npd= strcari , , adSearchForward
If Not .EOF Then Call preview
End If End If
End With End Sub
Perintah untuk proses NPD
Nota Pencairan Dana.
217
4.5.6 Tampilan Bagian Bendahara