Public Class Form1
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")
pangkat.Items.Add("juru muda")
pangkat.Items.Add("juru muda tingkat 1")
pangkat.Items.Add("juru")
status.Items.Add("menikah")
status.Items.Add("tidak menikah")
End Sub
Private Sub pangkat_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pangkat.SelectedIndexChanged
Select Case pangkat.Text
Case "juru muda"
gaji.Text = 1500000
Case "juru muda tingkat 1"
gaji.Text = 2500000
Case "juru"
gaji.Text = 3500000
End Select
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 = "hendro"
Case "002" : nama.Text = "dian"
Case "003" : nama.Text = "jhoni"
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" : tunjangan.Text = 0.1 * gaji.Text
Case "tidak menikah" : tunjangan.Text = 0
End Select
End Sub
Private Sub btntambah_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnhapus.Click
nik.Text = ""
pangkat.Text = ""
nama.Text = ""
gaji.Text = ""
tunjangan.Text = ""
pajak.Text = ""
End Sub
Private Sub btnkeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnkeluar.Click
End
End Sub
Private Sub btnproses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnproses.Click
gajibersih.Text = Val(gaji.Text) + Val(tunjangan.Text) - Val(pajak.Text)
End Sub
End Class
Tidak ada komentar:
Posting Komentar