- Back to Home »
- Penggajian Karyawan
Posted by : niki iswanti
Minggu, 19 Mei 2013
Public Class Form1
Sub
buattable()
LV.Columns.Add("NIK",
80, HorizontalAlignment.Center)
LV.Columns.Add("Nama",
180, HorizontalAlignment.Left)
LV.Columns.Add("Jabatan",
80, HorizontalAlignment.Center)
LV.Columns.Add("Gaji",
100, HorizontalAlignment.Left)
LV.Columns.Add("Status",
180, HorizontalAlignment.Center)
LV.Columns.Add("Tunjangan
Istri", 180, HorizontalAlignment.Left)
LV.Columns.Add("Jumlah
Anak", 140, HorizontalAlignment.Center)
LV.Columns.Add("Tunanagan
anak", 180, HorizontalAlignment.Left)
LV.Columns.Add("Jam
Lembur", 140, HorizontalAlignment.Center)
LV.Columns.Add("Honor
Lembur", 140, HorizontalAlignment.Center)
LV.Columns.Add("Pajak",
100, HorizontalAlignment.Left)
LV.Columns.Add("Total",
100, HorizontalAlignment.Center)
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(tun_istri.Text)
Lst.SubItems.Add(jmlh_ank.Text)
Lst.SubItems.Add(tun_ank.Text)
Lst.SubItems.Add(jam.Text)
Lst.SubItems.Add(honor.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
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("Tidak Menikah")
For i =
1 To 4
jmlh_ank.Items.Add(i)
Next i
For i =
1 To 10
jam.Items.Add(i)
Next i
Call
buattable()
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 = "KIKI AJHA"
Case
"002" : nama.Text = "Tulus AJha"
Case
"003" : nama.Text = "Bou"
End Select
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.015 * gaji.Text
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" : tun_istri.Text = 0.09
* gaji.Text
Case
"Tidak Menikah" : tun_istri.Text =
0
End Select
End Sub
Private Sub jmlh_ank_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As
System.EventArgs) Handles
jmlh_ank.SelectedIndexChanged
If
jmlh_ank.Text >= 2 And status.Text = "Menikah" Then
tun_ank.Text = 0.07 * gaji.Text
ElseIf
jmlh_ank.Text = 1 And status.Text = "Menikah" Then
tun_ank.Text = 0.03 * gaji.Text
Else
tun_ank.Text = 0
End If
End Sub
Private Sub proses_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles proses.Click
If
jabatan.Text = "Mandor" Then
honor.Text = "7500"
ElseIf
jabatan.Text = "Kepala Bagian" Then
honor.Text = "10000"
ElseIf
jabatan.Text = "Staff" Then
honor.Text = "5000"
Else
honor.Text = 0
End If
total.Text = Val(honor.Text * jam.Text)
+ Val(gaji.Text) + Val(tun_istri.Text) + Val(tun_ank.Text) + Val(pajak.Text)
End Sub
Private Sub keluar_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles keluar.Click
MsgBox("Terima kasih telah
menggunakan program ini", MsgBoxStyle.Information, "Keluar")
Me.Close()
End Sub
Private Sub simpan_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles simpan.Click
isitable()
nik.Text = ""
nama.Text = ""
jabatan.Text = ""
gaji.Text = ""
status.Text = ""
tun_istri.Text
= ""
jmlh_ank.Text =
""
tun_ank.Text = ""
jam.Text = ""
honor.Text
= ""
pajak.Text = ""
total.Text = ""
End Sub
Private Sub hps_data_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles hps_data.Click
LV.Items.Remove(LV.SelectedItems(0))
End Sub
Private Sub hps_smua_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles hps_smua.Click
LV.Items.Clear()
End Sub
End Class