TUGAS MEMBUAT FORM PENGGAJIAN dr VB.2008
Written By Khoir Black on Kamis, 30 Mei 2013 | 00.13.00
Public Class Form1
Sub BuatTabel()
LV.Columns.Add("NIK", 80, HorizontalAlignment.Center)
LV.Columns.Add("NAMA", 170, HorizontalAlignment.Center)
LV.Columns.Add("JABATAN", 100, HorizontalAlignment.Center)
LV.Columns.Add("INSENTIF", 100, HorizontalAlignment.Center)
LV.Columns.Add("PPH", 100, HorizontalAlignment.Center)
LV.Columns.Add("TOTAL GAJI", 80, HorizontalAlignment.Center)
LV.View = View.Details
LV.GridLines = True
LV.FullRowSelect = True
End Sub
Sub isitabel()
Dim Lst As New ListViewItem
Lst.Text = btnNIK.Text
Lst.SubItems.Add(btnNama.Text)
Lst.SubItems.Add(btnJabatan.Text)
Lst.SubItems.Add(btnInsentif.Text)
Lst.SubItems.Add(btnPph.Text)
Lst.SubItems.Add(btnTotalGaji.Text)
LV.Items.Add(Lst)
End Sub
Sub smpn(ByVal t As Form)
btnNIK.Text = ""
btnNama.Text = ""
btnJabatan.Text = ""
btnGaji.Text = ""
btnInsentif.Text = ""
btnPph.Text = ""
btnTotalGaji.Text = ""
End Sub
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
btnNIK.Items.Add("001")
btnNIK.Items.Add("002")
btnNIK.Items.Add("003")
btnNIK.Items.Add("004")
Call buatTabel()
End Sub
Private Sub btnNIK_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNIK.SelectedIndexChanged
Select Case btnNIK.Text
Case "001"
btnNama.Text = "ABDUL KHAIR T."
btnJabatan.Text = "Store Manager"
btnGaji.Text = 4000000
btnInsentif.Text = 500000
Case "002"
btnNama.Text = "DIAN ADNAN"
btnJabatan.Text = "Assistant Manager"
btnGaji.Text = 3000000
btnInsentif.Text = 400000
Case "003"
btnNama.Text = "HANAFI FIAN"
btnJabatan.Text = "STAFF LAPANGAN"
btnGaji.Text = 2000000
btnInsentif.Text = 300000
Case "004"
btnNama.Text = "INDRA KURNIAWAN"
btnJabatan.Text = "STAFF PENJURNALAN"
btnGaji.Text = 2500000
btnInsentif.Text = 200000
Case Else
btnNama.Text = ""
btnJabatan.Text = ""
btnGaji.Text = ""
btnInsentif.Text = ""
End Select
btnPph.Text = 0.015 * btnGaji.Text
End Sub
Sub bersih()
btnNIK.Text = ""
btnNama.Text = ""
btnJabatan.Text = ""
btnGaji.Text = ""
End Sub
Private Sub btnProses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnProses.Click
btnTotalGaji.Text = Val(btnGaji.Text) + Val(btnInsentif.Text) - Val(BtnPph.Text)
End Sub
Private Sub btnKeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnKeluar.Click
End
End Sub
Private Sub btnSimpan_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSimpan.Click
isitabel()
End Sub
Private Sub btnBatal_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBatal.Click
btnNIK.Text = ""
btnNama.Text = ""
btnJabatan.Text = ""
btnGaji.Text = ""
btnInsentif.Text = ""
btnPph.Text = ""
btnTotalGaji.Text = ""
End Sub
Private Sub btnHapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnHapus.Click
LV.Items.Remove(LV.SelectedItems(0))
End Sub
End Class
Related Games
If you enjoyed this article just click here, or subscribe to receive more great content just like it.
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar