PROGRAM II
Public Class Form2
Sub
buattabble()
lv.Columns.Add("NPM",
80, HorizontalAlignment.Center)
lv.Columns.Add("NAMA",
180, HorizontalAlignment.Left)
lv.View = View.Details
lv.GridLines = True
lv.FullRowSelect = True
End Sub
Sub
ISITABLE()
Dim LST
As New
ListViewItem
LST.Text = NPM.Text
LST.SubItems.Add(NAMA.Text)
lv.Items.Add(LST)
End Sub
Private Sub Form2_Load(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
buattabble()
End Sub
Private Sub SIMPAN_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles SIMPAN.Click
ISITABLE()
NPM.Text = ""
NAMA.Text = ""
End Sub
End Class
PROGRAM III
Public Class Form3
Sub
BUATTABLE()
LV.Columns.Add("NPM",
80, HorizontalAlignment.Center)
LV.Columns.Add("NAMA",
180, HorizontalAlignment.Left)
LV.View = View.Details
LV.GridLines = True
LV.FullRowSelect = True
End Sub
Sub
ISITABLE()
Dim LST
As New
ListViewItem
LST.Text = NPM.Text
LST.SubItems.Add(NAMA.Text)
LV.Items.Add(LST)
End Sub
Private Sub Form3_Load(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
BUATTABLE()
End Sub
Private Sub SIMPAN_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles SIMPAN.Click
ISITABLE()
NPM.Text = ""
NAMA.Text = ""
End Sub
Private Sub HAPUS_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles HAPUS.Click
LV.Items.Clear()
End Sub
Private Sub HPS_YGDIPILH_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles HPS_YGDIPILH.Click
LV.Items.Remove(LV.SelectedItems(0))
End Sub
End Class
PROGRAM III :
Public Class Form1
Sub
BUATTABLE()
LV.Columns.Add("NIK",
80, HorizontalAlignment.Center)
LV.Columns.Add("NAMA",
100, HorizontalAlignment.Left)
LV.Columns.Add("JABATAN",
60, HorizontalAlignment.Left)
LV.Columns.Add("GAJI",
60, HorizontalAlignment.Left)
LV.Columns.Add("STATUS",
60, HorizontalAlignment.Left)
LV.Columns.Add("TJN
KELUARGA", 60, HorizontalAlignment.Left)
LV.Columns.Add("PAJAK",
60, HorizontalAlignment.Left)
LV.Columns.Add("TOTAL
GAJI", 80, HorizontalAlignment.Left)
LV.View = View.Details
LV.GridLines = True
LV.FullRowSelect = True
End Sub
Sub
ISITABLE()
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(TTL_GAJI.Text)
LV.Items.Add(LST)
End Sub
Private Sub Form1_Load(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
NIK.Items.Add("001")
NIK.Items.Add("002")
NIK.Items.Add("003")
JABATAN.Items.Add("MANDOR")
JABATAN.Items.Add("KEPALA BAGIAN")
JABATAN.Items.Add("STAF")
STATUS.Items.Add("MENIKAH")
STATUS.Items.Add("LAJANG")
BUATTABLE()
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 = 1750000
Case
"KEPALA BAGIAN" : GAJI.Text =
2500000
Case
"STAF" : GAJI.Text = 1250000
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 = "KARO-KARO"
Case
"002" : NAMA.Text = "TARIGAN"
Case
"003" : NAMA.Text = "GINTING"
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
"LAJANG" : TUNJ.Text = 0
End Select
End Sub
Private Sub BTNPROSES_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles BTNPROSES.Click
TTL_GAJI.Text = Val(GAJI.Text) +
Val(TUNJ.Text) - Val(PAJAK.Text)
ISITABLE()
NIK.Text = ""
NAMA.Text = ""
JABATAN.Text = ""
GAJI.Text = ""
STATUS.Text = ""
TUNJ.Text = ""
PAJAK.Text = ""
TTL_GAJI.Text = ""
End Sub
Private Sub BTNKELUAR_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles BTNKELUAR.Click
Close()
End Sub
End Class