Home » » Tugas Pak Mesran

Tugas Pak Mesran

Written By seri rahayu on Selasa, 21 Mei 2013 | 10.12

Program

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.Text = "Ayu"
        NIK.Items.Add("001")
        NIK.Items.Add("002")
        NIK.Items.Add("003")

        Jabatan.Items.Add("MANDOR")
        Jabatan.Items.Add("KEPALA BAGIAN")
        Jabatan.Items.Add("STAFF")
        Status.Items.Add("MENIKAH")
        Status.Items.Add("TIDAK MENIKAH")

        For I = 1 To 4
            JAnak.Items.Add(I)
        Next I
        For I = 1 To 10
            JLembur.Items.Add(I)
        Next I
        Buattabel()
    End Sub


    Sub Buattabel()

        LV.Columns.Add("NIK", 80, HorizontalAlignment.Center)
        LV.Columns.Add("NAMA", 80, HorizontalAlignment.Left)
        LV.Columns.Add("JABATAN", 80, HorizontalAlignment.Center)
        LV.Columns.Add("GAJI", 80, HorizontalAlignment.Left)
        LV.Columns.Add("STATUS", 80, HorizontalAlignment.Center)
        LV.Columns.Add("T - ISTRI", 80, HorizontalAlignment.Left)
        LV.Columns.Add("J - ANAK", 80,      HorizontalAlignment.Center)
        LV.Columns.Add("T - ANAK", 80, HorizontalAlignment.Left)
        LV.Columns.Add("J - LEMBUR", 80, HorizontalAlignment.Center)
        LV.Columns.Add("H - LEMBUR", 80, HorizontalAlignment.Left)
        LV.Columns.Add("PAJAK", 80, HorizontalAlignment.Left)
        LV.Columns.Add("TOTAL", 80, HorizontalAlignment.Left)
        LV.View = View.Details
        LV.GridLines = True
        LV.FullRowSelect = True
    End Sub


    Sub ISITABEL()

        Dim LST As New ListViewItem
        LST.Text = NIK.Text
        LST.SubItems.Add(Nama.Text)
        LST.SubItems.Add(Jabatan.Text)
        LST.SubItems.Add(Gaji.Text)
        LST.SubItems.Add(Status.Text)
        LST.SubItems.Add(Tistri.Text)
        LST.SubItems.Add(JAnak.Text)
        LST.SubItems.Add(TAnak.Text)
        LST.SubItems.Add(JLembur.Text)
        LST.SubItems.Add(HLembur.Text)
        LST.SubItems.Add(Pajak.Text)
        LST.SubItems.Add(Total.Text)
        LV.Items.Add(LST)
    End Sub


    Sub smpn(ByVal t As Form)
        NIK.Text = ""
        Nama.Text = ""
        Jabatan.Text = ""
        Gaji.Text = ""
        Status.Text = ""
        Tistri.Text = ""
        JAnak.Text = ""
        TAnak.Text = ""
        JLembur.Text = ""
        HLembur.Text = ""
        Pajak.Text = ""
        Total.Text = ""
    End Sub


    Private Sub JABATAN_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Jabatan.SelectedIndexChanged
        Select Case Jabatan.Text
            Case "MANDOR" : Gaji.Text = 1750000
            Case "KEPALA BAGIAN" : Gaji.Text = 2500000
            Case "STAFF" : Gaji.Text = 1250000
        End Select
        Pajak.Text = 0.015 * Gaji.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" : Tistri.Text = 0.09 * Gaji.Text
            Case "TIDAK MENIKAH" : Tistri.Text = 0
        End Select
    End Sub


    Private Sub JAnak_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles JAnak.SelectedIndexChanged
        If JAnak.Text >= 2 And Status.Text = "MENIKAH" Then
            TAnak.Text = 0.07 * Gaji.Text
        ElseIf JAnak.Text = 1 And Status.Text = "MENIKAH" Then
            TAnak.Text = 0.03 * Gaji.Text
        Else
            TAnak.Text = 0
        End If
    End Sub


    Private Sub PROSES_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PROSES.Click
        If Jabatan.Text = "MANDOR" Then
            HLembur.Text = 7500
        ElseIf Jabatan.Text = "KEPALA BAGIAN" Then
            HLembur.Text = 10000
        ElseIf Jabatan.Text = "STAFF" Then
            HLembur.Text = 5000
        Else
            HLembur.Text = 0
        End If
        Total.Text = Val(HLembur.Text * JLembur.Text) + Val(Gaji.Text) + Val(Tistri.Text) + Val(TAnak.Text) - Val(Pajak.Text)
    End Sub


    Private Sub NIK_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NIK.SelectedIndexChanged
        Select Case NIK.Text
            Case "001" : Nama.Text = "Ayu"
            Case "002" : Nama.Text = "Rasmi"
            Case "003" : Nama.Text = "Fani"

        End Select
    End Sub


    Private Sub SIMPAN_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SIMPAN.Click
        ISITABEL()
        smpn(Me)
    End Sub


    Private Sub HAPUS_ITEMS_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles HAPUS_ITEMS.Click
        LV.Items.Remove(LV.SelectedItems(0))
    End Sub


    Private Sub HAPUS_SEMUA_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles HAPUS_SEMUA.Click
        LV.Items.Clear()
    End Sub


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


    Private Sub BATAL_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BATAL.Click
        NIK.Text = ""
        Nama.Text = ""
        Jabatan.Text = ""
        Gaji.Text = ""
        Status.Text = ""
        Tistri.Text = ""
        JAnak.Text = ""
        TAnak.Text = ""
        JLembur.Text = ""
        HLembur.Text = ""
        Pajak.Text = ""
        Total.Text = ""
    End Sub


End Class



Gambar Hasil Program

Share this article :

1 komentar:

  1. Menangkan Jutaan Rupiah dan Dapatkan Jackpot Hingga Puluhan Juta Dengan Bermain di www(.)SmsQQ(.)com

    Kelebihan dari Agen Judi Online SmsQQ :
    -Situs Aman dan Terpercaya.
    - Minimal Deposit Hanya Rp.10.000
    - Proses Setor Dana & Tarik Dana Akan Diproses Dengan Cepat (Jika Tidak Ada Gangguan).
    - Bonus Turnover 0.3%-0.5% (Disetiap Harinya)
    - Bonus Refferal 20% (Seumur Hidup)
    -Pelayanan Ramah dan Sopan.Customer Service Online 24 Jam.
    - 4 Bank Lokal Tersedia : BCA-MANDIRI-BNI-BRI

    8 Permainan Dalam 1 ID :
    Poker - BandarQ - DominoQQ - Capsa Susun - AduQ - Sakong - Bandar Poker - Bandar66

    Info Lebih Lanjut Hubungi Kami di :
    BBM: 2AD05265
    WA: +855968010699
    Skype: smsqqcom@gmail.com

    BalasHapus

 
Support : Your Link | Your Link | Your Link
Copyright © 2013. Seri Rahayu - All Rights Reserved
Template Created by Creating Website Published by Mas Template
Proudly powered by Blogger