PENGGAJIAN







 



Public Class penggajian

    Private Sub Form1_Load(ByValsender As System.Object, ByVal e AsSystem.EventArgs) Handles MyBase.Load
        nik.Items.Add("PM010")
        nik.Items.Add("PS111")
        nik.Items.Add("KU101")
        nik.Items.Add("GD100")

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

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

        jumlahanak.Items.Add("0")
        jumlahanak.Items.Add("1")
        jumlahanak.Items.Add("2")


    End Sub

    Private Sub nik_SelectedIndexChanged(ByValsender As System.Object, ByVal e AsSystem.EventArgs) Handlesnik.SelectedIndexChanged
        Select Case nik.Text
            Case"PM010"
                nama.Text = "Enda"
            Case"PS111"
                nama.Text = "Mela"
            Case"KU101"
                nama.Text = "Ani"
            CaseElse
                nama.Text = "Wimvy"
        End Select
        Dim p As String
        p = Microsoft.VisualBasic.Left(nik.Text, 2)
        If p = "PM" Then
            bagian.Text = "Pemasaran"
        ElseIfp = "PS" Then
            bagian.Text = "Personalia"
        ElseIfp = "KU" Then
            bagian.Text = "Keuangan"
        ElseIfp = "GD" Then
            bagian.Text = "Gudang"

        End If

    End Sub

    Private Sub jabatan_SelectedIndexChanged(ByVal sender AsSystem.Object, ByVal e AsSystem.EventArgs) Handlesjabatan.SelectedIndexChanged
        Select Case jabatan.Text
            Case"KEPALA DIVISI"
                gajipokok.Text = "5000000"
            Case"STAFF"
                gajipokok.Text = "2000000"
            CaseElse
                gajipokok.Text = "3500000"
        End Select
        pajak.Text = gajipokok.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"
                tunjangankeluarga.Text = gajipokok.Text * 0.15
            Case"Tidak Menikah"
                jumlahanak.Text = ""
                tunjangankeluarga.Text = 0
        End Select


    End Sub

    Private Sub jumlahanak_KeyPress(ByValsender As Object, ByVal e AsSystem.Windows.Forms.KeyPressEventArgs) Handlesjumlahanak.KeyPress
        Ife.KeyChar = Chr(13) Then
            SelectCase jumlahanak.Text
                Case"0"
                    tunjangananak.Text = 0
                Case"1"
                    tunjangananak.Text = gajipokok.Text * 0.05
                Case"2"
                    tunjangananak.Text = gajipokok.Text * 0.1
                CaseElse
                    tunjangananak.Text = gajipokok.Text * 0.5
            EndSelect
        End If
        totalgaji.Text = (gajipokok.Text) + Val(tunjangananak.Text) + Val(tunjangankeluarga.Text) - pajak.Text

    End Sub


    Private Sub btnhapus_Click(ByValsender As System.Object, ByVal e AsSystem.EventArgs) Handles btnhapus.Click
        nama.Text = ""
        nik.Text = ""
        bagian.Text = ""
        jabatan.Text = ""
        gajipokok.Text = ""
        pajak.Text = ""
        status.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)
        If tanya = vbCancel Then
            Me.Close()
        ElseIftanya = vbNo Then
            Me.Focus()
        ElseIftanya = vbYes Then
            Me.Close()
        End If

    End Sub
End Class

 

                                                                      Gambar Hasil

0 Response to "PENGGAJIAN"

Post a Comment