Sabtu, 18 Januari 2014

Penggajian

ini Prosesnya






ini prosesnya
Public Class Form1
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.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")
        Jumlah_ank.Items.Add("0")
        Jumlah_ank.Items.Add("2")
        Jumlah_ank.Items.Add("1")
    End Sub
    Private Sub Nik_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Nik.SelectedIndexChanged
        Select Case Nik.Text
            Case "PM010"
                Nama.Text = "Sofiana Barus"
            Case "KU101"
                Nama.Text = "Linda Wati"
            Case "PS111"
                Nama.Text = "Deswin Tiyani"
            Case Else
                Nama.Text = " Susila"
        End Select
        Dim K As String
        K = Microsoft.VisualBasic.Left(Nik.Text, 2)
        If K = "PM" Then
            Bagian.Text = "Pemasaran"
        ElseIf K = ("PS") Then
            Bagian.Text = "Personalia"
        ElseIf K = "KU" Then
            Bagian.Text = "Keuangan"
        Else
            Bagian.Text = "Gudang"
        End If
    End Sub
    Private Sub Jabatan_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Jabatan.SelectedIndexChanged
        Select Case Jabatan.Text
            Case "Kepala Devisit"
                Gaji_pokok.Text = "5000000"
            Case "Staf"
                Gaji_pokok.Text = "2000000"
            Case Else
                Gaji_pokok.Text = "3500000"
        End Select
        Pajak.Text = Gaji_pokok.Text * 0.1
    End Sub
    Private Sub Jumlah_ank_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Jumlah_ank.KeyPress
        If e.KeyChar = Chr(13) Then
            Select Case Jumlah_ank.Text
                Case "0"
                    tnjgan_ank.Text = 0
                Case "1"
                    tnjgan_ank.Text = Gaji_pokok.Text * 0.05
                Case "2"
                    tnjgan_ank.Text = Gaji_pokok.Text * 0.1
                Case Else
                    tnjgan_ank.Text = Gaji_pokok.Text * 0.5
            End Select
        End If
        Total_gji.Text = (Gaji_pokok.Text) + Val(Tunjangan_kluarga.Text) + Val(Tunjangan_kluarga.Text) - Pajak.Text
    End Sub
    Private Sub Jumlah_ank_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Jumlah_ank.SelectedIndexChanged
    End Sub
    Private Sub BtnKeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnKeluar.Click
        Dim tanya As String
        tanya = MsgBox("Apakah Anda ingin Keluar?", MsgBoxStyle.YesNo)
        If tanya = vbCancel Then
            Me.Close()
        ElseIf tanya = vbNo Then
            Me.Focus()
        ElseIf tanya = vbYes Then
            Me.Close()
        End If
    End Sub
    Private Sub BtnHapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnHapus.Click
        Nik.Text = ""
        Nama.Text = ""
        Bagian.Text = ""
        Jabatan.Text = ""
        tnjgan_ank.Text = ""
        Tunjangan_kluarga.Text = ""
        Pajak.Text = ""
        Status.Text = ""
        Gaji_pokok.Text = ""
        Total_gji.Text = ""
        Jumlah_ank.Text = ""
    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_kluarga.Text = Gaji_pokok.Text * 0.15
            Case "Tidak Menikah"
                Jumlah_ank.Text = ""
                Tunjangan_kluarga.Text = 0
        End Select
    End Sub
End Class


Tidak ada komentar:

Posting Komentar