Minggu, 17 November 2013

0 Gaji Pegawai VB2008


Jangan Lupa Tinggalkan Komentar Kalian Ya...!!!



Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        NIK.Items.Add("PM001")
        NIK.Items.Add("GD002")
        NIK.Items.Add("KU003")
        NIK.Items.Add("PS004")

        JABATAN.Items.Add("KEPALA DIVISI")
        JABATAN.Items.Add("WAKIL KEPALA")
        JABATAN.Items.Add("STAFF")

        STATUS.Items.Add("MENIKAH")
        STATUS.Items.Add("TIDAK MENIKAH")

        Dim D As Integer
        For D = 0 To 10
            JMLANAK.Items.Add(D)

        Next
    End Sub

    Private Sub NIK_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NIK.SelectedIndexChanged
        Dim N As String
        N = Microsoft.VisualBasic.Left(NIK.Text, 2)

        If N = "PM" Then
            BAGIAN.Text = "PEMASOKAN"
            NAMA.Text = "SUSILAWATI"

        ElseIf N = "GD" Then
            BAGIAN.Text = "GUDANG"
            NAMA.Text = "BOY"
        ElseIf N = "KU" Then
            BAGIAN.Text = "KEUANGAN"
            NAMA.Text = "ANANG"
        Else

            BAGIAN.Text = "PERSONALIA"
            NAMA.Text = "FITRI HANDASARI"


        End If
    End Sub

    Private Sub JABATAN_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles JABATAN.SelectedIndexChanged
        If JABATAN.Text = "KEPALA DIVISI" Then
            GAJIPOKOK.Text = "5000000"
            PAJAK.Text = 0.1 * GAJIPOKOK.Text
        ElseIf JABATAN.Text = "STAFF" Then
            GAJIPOKOK.Text = "2000000"
            PAJAK.Text = 0.1 * GAJIPOKOK.Text
        ElseIf JABATAN.Text = "WAKIL KEPALA" Then
            GAJIPOKOK.Text = "3000000"
            PAJAK.Text = 0.1 * GAJIPOKOK.Text

        End If
    End Sub

    Private Sub STATUS_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles STATUS.SelectedIndexChanged
        If STATUS.Text = "MENIKAH" Then
            TUNKELUARGA.Text = 0.15 * GAJIPOKOK.Text
        Else
            TUNKELUARGA.Text = 0

        End If
    End Sub

    Private Sub JMLANAK_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles JMLANAK.SelectedIndexChanged
        If JMLANAK.Text = "1" Then
            TUNANAK.Text = "0.05" * GAJIPOKOK.Text
        ElseIf JMLANAK.Text = "2" Then
            TUNANAK.Text = "0.1"
        Else
            TUNANAK.Text = 0

            TOTALGAJI.Text = Val(GAJIPOKOK.Text) + Val(TUNKELUARGA.Text) + Val(TUNANAK.Text) - Val(PAJAK.Text)

    End Sub


    Private Sub HAPUS_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles HAPUS.Click
        NIK.Text = ""
        NAMA.Text = ""
        BAGIAN.Text = ""
        JABATAN.Text = ""
        PAJAK.Text = ""
        GAJIPOKOK.Text = ""
        PAJAK.Text = ""
        TUNANAK.Text = ""
        TUNKELUARGA.Text = ""
        JMLANAK.Text = ""
        TOTALGAJI.Text = ""


    End Sub

    Private Sub KELUAR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KELUAR.Click
        End

    End Sub
End Class


0 komentar:

Posting Komentar