links

zumrotulaqobahhsb.blogspot.com. Diberdayakan oleh Blogger.

Sabtu, 25 Mei 2013

PROGRAM PENYAJIAN GAJI MENGGUNAKAN LISTVIEW....

Public Class Form1

    Sub BUATTABLE()
        LV.Columns.Add("NIK", 80, HorizontalAlignment.Center)
        LV.Columns.Add("NAMA", 100, HorizontalAlignment.Left)
        LV.Columns.Add("JABATAN", 60, HorizontalAlignment.Left)
        LV.Columns.Add("GAJI", 60, HorizontalAlignment.Left)
        LV.Columns.Add("STATUS", 60, HorizontalAlignment.Left)
        LV.Columns.Add("TJN KELUARGA", 60, HorizontalAlignment.Left)
        LV.Columns.Add("PAJAK", 60, HorizontalAlignment.Left)
        LV.Columns.Add("TOTAL GAJI", 80, HorizontalAlignment.Left)
        LV.View = View.Details
        LV.GridLines = True
        LV.FullRowSelect = True
    End Sub
    Sub ISITABLE()
        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(TUNJ.Text)
        LST.SubItems.Add(PAJAK.Text)
        LST.SubItems.Add(TTL_GAJI.Text)
        LV.Items.Add(LST)
    End Sub


    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        NIK.Items.Add("001")
        NIK.Items.Add("002")
        NIK.Items.Add("003")
        JABATAN.Items.Add("MANDOR")
        JABATAN.Items.Add("KEPALA BAGIAN")
        JABATAN.Items.Add("STAF")
        STATUS.Items.Add("MENIKAH")
        STATUS.Items.Add("LAJANG")
        BUATTABLE()
    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 "STAF" : GAJI.Text = 1250000
        End Select
        PAJAK.Text = 0.15 * GAJI.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 = "HASIBUAN"
            Case "002" : NAMA.Text = "NASUTION"
            Case "003" : NAMA.Text = "LUBIS"
        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" : TUNJ.Text = 0.15 * GAJI.Text
            Case "LAJANG" : TUNJ.Text = 0
        End Select
    End Sub

    Private Sub BTNPROSES_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTNPROSES.Click
        TTL_GAJI.Text = Val(GAJI.Text) + Val(TUNJ.Text) - Val(PAJAK.Text)
        ISITABLE()
        NIK.Text = ""
        NAMA.Text = ""
        JABATAN.Text = ""
        GAJI.Text = ""
        STATUS.Text = ""
        TUNJ.Text = ""
        PAJAK.Text = ""
        TTL_GAJI.Text = ""
    End Sub

    Private Sub BTNKELUAR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTNKELUAR.Click
        Close()
    End Sub
End Class
 *HASILNYA PROGRAMNYA..

Tidak ada komentar:

Posting Komentar