Menghitung Gaji Pegawai Dengan VB.Net

Mencari Gaji Pegawai Menggunakan Visual Basic 2008


Microsoft Visual Basic 2008

Listing Mencari Gaji Pegawai
Public Class Form1



Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        nn_pegawai.Items.Add("Lukman Wijaya")
        nn_pegawai.Items.Add("Try")
        nn_pegawai.Items.Add("Mawar")

        stts_pegawai.Items.Add("Menikah")
        stts_pegawai.Items.Add("Belum Menikah")
    End Sub

    Private Sub btnexit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnexit.Click
        Dim tanya As String
        tanya = MsgBox("Anda Yakin Ingin Keluar ?", MsgBoxStyle.Question + MsgBoxStyle.YesNo)
        If tanya = vbYes Then
            Me.Close()
        Else
            Exit Sub
        End If
    End Sub

    Private Sub btnreset_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnreset.Click
        nn_pegawai.Text = ""
        gol_pegawai.Text = ""
        pajak.Text = ""
        stts_pegawai.Text = ""
        tjg_pegawai.Text = ""
        total_gaji.Text = ""
    End Sub

    Private Sub gapok_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gapok.TextChanged
        Select Case gapok.Text

            Case "Golongan A"
                gapok.Text = "2500000"
            Case "Golongan B"
                gapok.Text = "3500000"
            Case "Golongan C"
                gapok.Text = "4500000"
        End Select
    End Sub


    Private Sub status_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles status.SelectedIndexChanged
        If stts_pegawai.Text = "Menikah" Then
            tjg_pegawai.Text = 0.05 * gapok.Text
        Else
            tjg_pegawai.Text = 0
        End If
    End Sub
    Private Sub btnproses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

        pajak.Text = 0.1 * gapok.Text
        total_gaji.Text = Val(gapok.Text) + Val(tjg_pegawai.Text) - Val(pajak.Text)
    End Sub

End Class



Hasil Listingnya sebagai berikut :


















Terima kasih telah mengunjungi blog My Little Blog

Belajar Pemograman

Share this

Related Posts

Previous
Next Post »

Terima Kasih Telah Mengunjungi Blog saya dan Berkomentar dengan Sopan :)