PEMBAYARAN GAJI PEGAWAI

                  



Public Class Form1

    Private Sub Form1_Load(ByValsender As System.Object, ByVal e AsSystem.EventArgs) Handles MyBase.Load
        golongan.Items.Add("A")
        golongan.Items.Add("B")
        golongan.Items.Add("C")

        status.Items.Add("Menikah")
        status.Items.Add("Tidak Menikah")


    End Sub



    Private Sub golongan_SelectedIndexChanged(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handlesgolongan.SelectedIndexChanged
        Select Case golongan.Text
            Case"A"
                nama.Text = "Muhammad Wahyu"
            Case"B"
                nama.Text = "Enda Mahdi"
            Case"C"
                nama.Text = "Nesya Amanda"
        End Select

        Select Case golongan.Text
            Case"A"
                gaji.Text = "2500000"
            Case"B"
                gaji.Text = "3500000"
            Case"C"
                gaji.Text = "4500000"
        End Select
        pajak.Text = gaji.Text * 0.1
    End Sub


    Private Sub status_SelectedIndexChanged(ByVal sender AsSystem.Object, ByVal e AsSystem.EventArgs) Handlesstatus.SelectedIndexChanged
        Select Case status.Text
            Case"Menikah"
                tkeluarga.Text = gaji.Text * 0.5
            Case"Tidak Menikah"
                tkeluarga.Text = 0
        End Select

    End Sub

   

    Private Sub btnperses_Click(ByValsender As System.Object, ByVal e AsSystem.EventArgs) Handles btnperses.Click
        tgaji.Text = (gaji.Text) - Val(tkeluarga.Text) + pajak.Text
        tgaji.Enabled = False
    End Sub

    Private Sub btnhapus_Click(ByValsender As System.Object, ByVal e AsSystem.EventArgs) Handles btnhapus.Click
        nama.Text = ""
        golongan.Text = ""
        gaji.Text = ""
        pajak.Text = ""
        status.Text = ""
        tkeluarga.Text = ""
        tgaji.Text = ""


    End Sub

    Private Sub btnkeluar_Click(ByValsender As System.Object, ByVal e AsSystem.EventArgs) Handles btnkeluar.Click
        Dimtanya As String
        tanya = MsgBox("Apakah Anda ingin Keluar?", MsgBoxStyle.YesNo)
        Iftanya = vbCancel Then
            Me.Close()
        ElseIftanya = vbNo Then
            Me.Focus()
        ElseIftanya = vbYes Then
            Me.Close()
        End If

    End Sub
End Class


Penyelesaian

 

 

0 Response to "PEMBAYARAN GAJI PEGAWAI"

Post a Comment