PublicClass Form1
PrivateSub
KELUAR_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles
btnkeluar.Click
End
EndSub
PrivateSub
Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load
nip.Items.Add("123002")
nip.Items.Add("123003")
nip.Items.Add("123004")
nip.Items.Add("123005")
nip.Items.Add("123006")
nip.Items.Add("123007")
nip.Items.Add("123008")
gol.Items.Add("IA")
gol.Items.Add("IIA")
gol.Items.Add("IIIA")
jabatan.Items.Add("PEGAWAI")
jabatan.Items.Add("Kabag")
jabatan.Items.Add("Kasub")
Call
BUAT_TABEL()
EndSub
Sub
BUAT_TABEL()
LV.GridLines = True
LV.View = View.Details
LV.FullRowSelect = True
LV.Columns.Add("NIP")
LV.Columns.Add("Nama")
LV.Columns.Add("Gol")
LV.Columns.Add("Gaji")
LV.Columns.Add("Jabatan")
LV.Columns.Add("Tunjangan")
EndSub
PrivateSub
btnmasuk_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles
btnmasuk.Click
Dim lst AsNew ListViewItem
lst.Text = nip.Text
lst.SubItems.Add(nama.Text)
lst.SubItems.Add(gol.Text)
lst.SubItems.Add(gaji.Text)
lst.SubItems.Add(jabatan.Text)
lst.SubItems.Add(tunjangan.Text)
LV.Items.Add(lst)
EndSub
PrivateSub
btnhapuslistview_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles
btnhapuslistview.Click
LV.Items.Clear()
EndSub
PrivateSub
nip_SelectedIndexChanged(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles
nip.SelectedIndexChanged
If nip.Text =
123002 Then
nama.Text = "ADI"
ElseIf nip.Text =
123003 Then
nama.Text = "EKO"
ElseIf nip.Text =
123004 Then
nama.Text = "BUDI"
ElseIf nip.Text =
123005 Then
nama.Text = "JOKO"
ElseIf nip.Text =
123006 Then
nama.Text = "Amoy"
ElseIf nip.Text =
123007 Then
nama.Text = "BODO"
ElseIf nip.Text =
123008 Then
nama.Text = "JOKY"
EndIf
EndSub
PrivateSub
btnhapusisian_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles
btnhapusisian.Click
LV.Items.Remove(LV.SelectedItems(0))
EndSub
EndClass
OUTPUT
Tidak ada komentar:
Posting Komentar