Jumat, 17 Januari 2014
Program Penggajian Pegawai
Masukkan Perintah Di Bawah Ini
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")
nik.Items.Add("PM011")
jabatan.Items.Add("Kepala Divisi")
jabatan.Items.Add("Staf")
jabatan.Items.Add("Wakil Kepala")
status.Items.Add("Menikah")
status.Items.Add("Belum Menikah")
Dim h As Integer
For h = 1 To 4
jumlah_Anak.Items.Add(h)
Next h
End Sub
Private Sub nama_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nama.TextChanged
If jabatan.Text Then
jabatan.Text = "kepala"
jabatan.Text = "staf"
jabatan.Text = "wakil"
End If
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 = "Awal"
Case "PS111"
Nama.Text = "Dasner"
Case "KU101"
nama.Text = "Mulia"
Case "GD100"
nama.Text = "Doni"
Case "PM011"
Nama.Text = "Taufik""
End Select
Dim M As String
M = Microsoft.VisualBasic.Left(nik.Text, 2)
Select Case M
Case "PM"
bagian.Text = "Pemasaran"
Case "PS"
bagian.Text = "Personalia"
Case "KU"
bagian.Text = "Keuangan"
Case "GD"
bagian.Text = "Gudang"
End Select
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 Divisi"
Gaji_pokok.Text = 5000000
pajak.Text = 0.1 * Gaji_pokok.Text
Case "Staf"
Gaji_pokok.Text = 2000000
pajak.Text = 0.1 * Gaji_pokok.Text
Case "Wakil Kepala"
Gaji_pokok.Text = 3500000
pajak.Text = 0.1 * Gaji_pokok.Text
End Select
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_keluarga.Text = 0.15 * Gaji_pokok.Text
Case "Belum Menikah"
tunjangan_keluarga.Text = 0 * Gaji_pokok.Text
End Select
End Sub
Private Sub jumnak_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles jumlah_Anak.SelectedIndexChanged
Select Case jumlah_Anak.Text
Case "1"
jumlah_Anak.Text = 0.5 * total_gaji.Text
Case "2"
jumlah_Anak.Text = 0.1 * total_gaji.Text
Case "3"
jumlah_Anak.Text = "Berlaku Untuk Dua Anak saja"
Case "4"
jumlah_Anak.Text = "Berlaku Untuk Dua Anak saja"
End Select
End Sub
Private Sub Total_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles total_gaji.KeyPress
total_gaji.Text = Val(Gaji_pokok.Text) + Val(tunjangan_keluarga.Text) + Val(jumlah_Anak.Text) - pajak.Text
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 = ""
total_gaji.Text = ""
pajak.Text = ""
status.Text = ""
jumlah_Anak.Text = ""
tunjangan_keluarga.Text = ""
Gaji_pokok.Text = ""
tunjangan_anak.Text = ""
End Sub
Private Sub BtnKeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnKeluar.Click
Me.Close()
End Sub
End Class
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar