HAIL
PROSESNYA
HASIL
LIST VIEWNYA
SINTAXNYA :
Public Class Form1
Sub
buattabel()
lv.Columns.Add("nik",
80, HorizontalAlignment.Center)
lv.Columns.Add("nama",
80, HorizontalAlignment.Left)
lv.Columns.Add("jabatan",
80, HorizontalAlignment.Center)
lv.Columns.Add("gaji",
80, HorizontalAlignment.Left)
lv.Columns.Add("status",
80, HorizontalAlignment.Center)
lv.Columns.Add("tunjangan",
80, HorizontalAlignment.Left)
lv.Columns.Add("pajak",
80, HorizontalAlignment.Center)
lv.Columns.Add("total",
80, HorizontalAlignment.Left)
lv.View = View.Details
lv.GridLines = True
lv.FullRowSelect = True
End Sub
Sub
isitabel()
Dim lst
As New
ListViewItem
lst.Text = nik.Text
lst.SubItems.Add(nama.Text)
lst.SubItems.Add(jabatan.Text)
lst.SubItems.Add(gaji.Text)
lst.SubItems.Add(status.Text)
lst.SubItems.Add(tunj.Text)
lst.SubItems.Add(pajak.Text)
lst.SubItems.Add(total.Text)
lv.Items.Add(lst)
End Sub
Private Sub Form1_Load(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
buattabel()
nik.Items.Add("001")
nik.Items.Add("002")
nik.Items.Add("003")
jabatan.Items.Add("mandor")
jabatan.Items.Add("kabag")
jabatan.Items.Add("staff")
status.Items.Add("menikah")
status.Items.Add("tidak menikah")
End Sub
Private Sub simpan_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles simpan.Click
isitabel()
nik.Text = ""
nama.Text = ""
jabatan.Text = ""
gaji.Text = ""
status.Text = ""
tunj.Text = ""
pajak.Text = ""
total.Text = ""
End Sub
Private Sub jabatan_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As
System.EventArgs) Handles
jabatan.SelectedIndexChanged
Select Case jabatan.Text
Case
"mandor" : gaji.Text = 1700000
Case
"kabag" : gaji.Text = 18000000
Case
"staff" : gaji.Text = 16000000
End Select
pajak.Text = 0.15 * gaji.Text
End Sub
Private Sub nik_SelectedIndexChanged(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles
nik.SelectedIndexChanged
Select Case nik.Text
Case
"001" : nama.Text = "sairanto yana"
Case
"002" : nama.Text = "yana si kecil"
Case
"003" : nama.Text = "yana takashi"
End Select
End Sub
Private Sub status_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As
System.EventArgs) Handles
status.SelectedIndexChanged
Select Case status.Text
Case
"menikah" : tunj.Text = 0.15 *
gaji.Text
Case
"tidak menikah" : tunj.Text = 0
End Select
End Sub
Private Sub proses_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles proses.Click
total.Text = Val(gaji.Text) +
Val(tunj.Text) - Val(pajak.Text)
End Sub
Private Sub keluar_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles keluar.Click
End
End Sub
Private Sub baru_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles baru.Click
nik.Text = ""
nama.Text = ""
jabatan.Text = ""
gaji.Text = ""
status.Text = ""
tunj.Text = ""
pajak.Text = ""
total.Text = ""
End Sub
End Class
yanaadhesta
BalasHapusKomentar ini telah dihapus oleh pengarang.
BalasHapus