Public Class penggajian_pegawai
Private Sub penggajian_pegawai_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
nip.Items.Add("011394")
nip.Items.Add("01356")
nip.Items.Add("01467")
nip.Items.Add("01578")
nip.Items.Add("01689")
gol.Items.Add("IIIA")
gol.Items.Add("IIIB")
gol.Items.Add("IVA")
gol.Items.Add("IVB")
status.Items.Add("MENIKAH")
status.Items.Add("TIDAK MENIKAH")
jlh_anak.Items.Add("0")
jlh_anak.Items.Add("1")
jlh_anak.Items.Add("2")
jlh_anak.Items.Add("3")
jlh_anak.Items.Add("4")
End Sub
Private Sub nip_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nip.SelectedIndexChanged
If nip.Text = "011394" Then
nama.Text = "fatimah"
ElseIf nip.Text = "01356" Then
nama.Text = "Ramadhani"
ElseIf nip.Text = "01467" Then
nama.Text = "eilan"
ElseIf nip.Text = "01578" Then
nama.Text = "putiha"
ElseIf nip.Text = "01689" Then
nama.Text = "Ramadhan"
End If
End Sub
Private Sub gol_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gol.SelectedIndexChanged
If gol.Text = "IIIA" Then
gapok.Text = 1500000
ElseIf gol.Text = "IIIB" Then
gapok.Text = 1750000
ElseIf gol.Text = "IVA" Then
gapok.Text = 2500000
ElseIf gol.Text = "IVB" Then
gapok.Text = 3000000
End If
End Sub
Private Sub status_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles status.SelectedIndexChanged
tunjkeluarga.Text = 0
tunjanak.Text = 0
If status.Text = "MENIKAH" Then
jlh_anak.Items.Add("0")
jlh_anak.Items.Add("1")
jlh_anak.Items.Add("2")
jlh_anak.Items.Add("3")
jlh_anak.Items.Add("4")
tunjkeluarga.Text = "0.2" * gapok.Text
ElseIf status.Text = "TIDAK MENIKAH" Then
jlh_anak.Items.Add("-")
tunjanak.Text = 0
tunjkeluarga.Text = 0
jlh_anak.Items.Clear()
End If
total_gaji.Text = Val(gapok.Text) + Val(tunjkeluarga.Text) + Val(tunjanak.Text)
End Sub
Private Sub Bthapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Bthapus.Click
nip.Text = ""
nama.Text = ""
gol.Text = ""
status.Text = ""
jlh_anak.Text = ""
gapok.Text = ""
tunjkeluarga.Text = ""
tunjanak.Text = ""
total_gaji.Text = ""
End Sub
Private Sub Btkeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btkeluar.Click
End
End Sub
Private Sub jlh_anak_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles jlh_anak.SelectedIndexChanged
If jlh_anak.Text = 0 Then
tunjanak.Text = 0
ElseIf jlh_anak.Text <= 2 Then
tunjanak.Text = 150000 * jlh_anak.Text
ElseIf jlh_anak.Text > 2 Then
tunjanak.Text = 150000 * 2
End If
total_gaji.Text = Val(gapok.Text) + Val(tunjkeluarga.Text) + Val(tunjanak.Text)
End Sub
Tidak ada komentar:
Posting Komentar