Sabtu, 01 Juni 2013
from gaji menggunakan listview
FROM GAJI MENGGUNAKAN LISTVIEW
ini tampilan awal form gaji dengan listview
masukkan syntax
Public Class Form1
Sub BuatTable()
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.Center)
Lv.Columns.Add("status", 80, HorizontalAlignment.Center)
Lv.Columns.Add("tunj istri", 80, HorizontalAlignment.Center)
Lv.Columns.Add("jumlah anak", 80, HorizontalAlignment.Center)
Lv.Columns.Add("tunj anak", 80, HorizontalAlignment.Center)
Lv.Columns.Add("jam lembur", 80, HorizontalAlignment.Center)
Lv.Columns.Add("honor lembur", 80, HorizontalAlignment.Center)
Lv.Columns.Add("pajak", 80, HorizontalAlignment.Center)
Lv.Columns.Add("total", 80, HorizontalAlignment.Center)
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(tunjistri.Text)
Lst.SubItems.Add(jumlahanak.Text)
Lst.SubItems.Add(tunjanak.Text)
Lst.SubItems.Add(jamlembur.Text)
Lst.SubItems.Add(honorlembur.Text)
Lst.SubItems.Add(pajak.Text)
Lst.SubItems.Add(total.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("Staff")
For i = 1 To 4
jumlahanak.Items.Add(i)
Next i
For i = 1 To 10
jamlembur.Items.Add(i)
Next i
status.Items.Add("menikah")
status.Items.Add("tidak menikah")
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 "Staff" : gaji.Text = 1250000
End Select
pajak.Text = 0.015 * Val(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" : tunjistri.Text = 0.09 * gaji.Text
Case "tidak menikah" : tunjistri.Text = 0
End Select
End Sub
Private Sub jumlahanak_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles jumlahanak.SelectedIndexChanged
If jumlahanak.Text >= 2 And status.Text = "menikah" Then
tunjanak.Text = 0.07 * gaji.Text
ElseIf jumlahanak.Text = 1 And status.Text = "menikah" Then
tunjanak.Text = 0.03 * gaji.Text
Else
tunjanak.Text = 0
End If
End Sub
Private Sub Btnproses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnproses.Click
If jabatan.Text = "Mandor" Then
honorlembur.Text = 7500
ElseIf jabatan.Text = "Kepala Bagian" Then
honorlembur.Text = 10000
ElseIf jabatan.Text = "Staff" Then
honorlembur.Text = 5000
Else
honorlembur.Text = 0
End If
total.Text = Val(honorlembur.Text * jamlembur.Text) + Val(gaji.Text) + Val(tunjistri.Text) + Val(tunjanak.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 = "oncom"
Case "002" : nama.Text = " udin"
Case "003" : nama.Text = "ujang"
End Select
End Sub
Private Sub Btnkeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnkeluar.Click
end
End Sub
Private Sub Btnbaru_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnbaru.Click
isitabel()
NIK.Text = ""
nama.Text = ""
jabatan.Text = ""
gaji.Text = ""
status.Text = ""
tunjistri.Text = ""
jumlahanak.Text = ""
tunjanak.Text = ""
jamlembur.Text = ""
honorlembur.Text = ""
pajak.Text = ""
total.Text = ""
End Sub
Private Sub hapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles hapus.Click
Lv.Items.Clear()
End Sub
Private Sub nhapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nhapus.Click
Lv.Items.Remove(Lv.SelectedItems(0))
End Sub
End Class
Tampilan setelah dijalankan.
Menjalankan Programnya
Setelah disimpan kedalam listview
sekian tugas lisview dari saya
hormat saya:
Eka sahputra
http://ekasyahputra89.blogspot.com/2013/06/from-gaji-menggunakan-listview.html
Label:
FROM LISTVIEW
Langganan:
Posting Komentar (Atom)
TOKO CAMERA CENTER
BalasHapusALAMAT TOKO:MALL RATU PLAZA L1.NO 1 BJL.JEND SUDIRMAN JAKARTA SELATAN
Cara Order Invite Pin BB:2AD96D7F HP:085229488511
format nama... alamat... no ktp... kode pos.... tipe barang... no hp/tlp....
www.cameracenter2015.blogspot.com
Nikon D3100 - Lensa Kit 18-55mm - 14.2 MP - Hitam Rp 1.750.000
Nikon D800 Body - 36.3 MP - Hitam + Memori SDHC 8 GB Rp 9.800.000
Nikon D7000 Lensa Kit 18-105mm - 16.2 MP - Hitam Rp 4.800.000
Nikon D3200 - Lensa Kit 18-55mm - 24.2 MP - Hitam + Memori SDHC 8 GB Rp 2.100.000
Nikon D600 Lensa Kit 24-85mm – 24.3 MP – Hitam + Memori SDHC 8 GB Rp 12.000.000
Canon EOS 7D Lensa Kit 18-135mm – 18 MP – Hitam + CF 4 GB Rp4.150.000
Canon EOS 1100DC Kit 18-55 Black + Bonus SDHC 8 GB + Tripod Excell Promos Rp.1.750.000
Canon EOS 600D - Lensa Kit 18 - 55 mm - 18 MP + Memori SDHC Sandisk 8 GB class 4 Rp.2.550.000
Canon EOS 650D - Lensa Kit 18 - 55 mm IS - 18 MP Rp.3.100.000
Sony Alpha SLT-A65VK - 24.3 MP - Hitam Rp 4.OOO.000
Sony SLT-A99V DSLR - 24.3 MP - Hitam Rp.10.800.000
Sony Alpha SLT-A37M - 16.1 MP - Hitam Rp.3.200.000
Sony Alpha SLT-A77VQ - 24.3 MP - Hitam Rp.7.200.000
saya memberikan penawaran khusus kepada para pembeli baru dan pelanggan kami.
Berikut adalah daftar harga KAMERA, untuk penawaran khusus dari kami dalam program penjualan Online
berupa beberapa type barang kamera .
Berikut daftar harga kamera yang saya tawarkan :
KAMI Melayani Pengiriman Ke seluruh indonesia melalui TIKI/JNE