CONTOH PROGRAM PENGGAJIAN PEGAWAI
PublicClass Form1
PrivateSub
Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load
NIP.Items.Add("11111")
NIP.Items.Add("11112")
NIP.Items.Add("11113")
NIP.Items.Add("11114")
GOL.Items.Add("IIIA")
GOL.Items.Add("IIIB")
GOL.Items.Add("IVA")
GOL.Items.Add("IVB")
STATUS.Items.Add("MENIKAH")
STATUS.Items.Add("TDK MENIKAH")
JUMLAHANAK.Items.Add("0")
JUMLAHANAK.Items.Add("1")
JUMLAHANAK.Items.Add("2")
JUMLAHANAK.Items.Add("3")
JUMLAHANAK.Items.Add("4")
JUMLAHANAK.Items.Add("5")
EndSub
PrivateSub
BTNKELUAR_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles
BTNKELUAR.Click
End
EndSub
PrivateSub
BTNHAPUS_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles
BTNHAPUS.Click
NIP.Text = ""
NAMA.Text = ""
GOL.Text = ""
STATUS.Text = ""
JUMLAHANAK.Text = ""
GAJIPOKOK.Text = ""
TUNJKELUARGA.Text = ""
TUNJANAK.Text = ""
TOTALGAJI.Text = ""
EndSub
PrivateSub
NAMA_TextChanged(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles
NAMA.TextChanged
EndSub
PrivateSub
NIP_SelectedIndexChanged(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles
NIP.SelectedIndexChanged
If NIP.Text =
"11111"Then
NAMA.Text = "SUJARWADI"
ElseIf NIP.Text =
"11112"Then
NAMA.Text = "CAN HUKRI"
ElseIf NIP.Text =
"11113"Then
NAMA.Text = "ALI NASTI"
ElseIf NIP.Text =
"11114"Then
NAMA.Text = "ABDUL"
EndIf
EndSub
PrivateSub
GOL_SelectedIndexChanged(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles
GOL.SelectedIndexChanged
If GOL.Text =
"IIIA"Then
GAJIPOKOK.Text = "1500000"
ElseIf GOL.Text =
"IIIB"Then
GAJIPOKOK.Text = "1750000"
ElseIf GOL.Text =
"IVA"Then
GAJIPOKOK.Text = "2500000"
ElseIf GOL.Text =
"IVB"Then
GAJIPOKOK.Text = "3000000"
EndIf
EndSub
PrivateSub
STATUS_SelectedIndexChanged(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles
STATUS.SelectedIndexChanged
If
STATUS.Text = "MENIKAH"Then
TUNJKELUARGA.Text = 0.2 *
GAJIPOKOK.Text
ElseIf
STATUS.Text = "TDK MENIKAH"Then
TUNJKELUARGA.Text = "0"
EndIf
EndSub
PrivateSub
JUMLAHANAK_SelectedIndexChanged(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles
JUMLAHANAK.SelectedIndexChanged
If
JUMLAHANAK.Text = 0 Then
TUNJANAK.Text = 0
ElseIf
JUMLAHANAK.Text <= 2 Then
TUNJANAK.Text = 150000 *
JUMLAHANAK.Text
ElseIf JUMLAHANAK.Text
>= 2 Then
TUNJANAK.Text = 150000 * 2
EndIf
EndSub
PrivateSub
GAJIPOKOK_TextChanged(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles
GAJIPOKOK.TextChanged
EndSub
EndClass
Tidak ada komentar:
Posting Komentar