[+] Post Title :
[+] Date : Friday, May 24, 2013
[+] Author : Unknown
[+] Link : http://sulastrijuliana.blogspot.com/2013/05/tugas-pemrograman-visual-basic-net.html
[+] Type : VB.NET
Tugas Pemrograman Visual Basic .Net
[+] Date : Friday, May 24, 2013
[+] Author : Unknown
[+] Link : http://sulastrijuliana.blogspot.com/2013/05/tugas-pemrograman-visual-basic-net.html
[+] Type : VB.NET
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 Dim lst As New ListViewItem lst.Text = Nik.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" : TunjanganIstri.Text = 0.09 * Gaji.Text Case "Tidak Menikah" : TunjanganIstri.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 TunjanganAnak.Text = 0.07 * Gaji.Text ElseIf JumlahAnak.Text = 1 And Status.Text = "Menikah" Then TunjanganAnak.Text = 0.03 * Gaji.Text Else TunjanganAnak.Text = 0 End If End Sub
rivate 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(TunjanganIstri.Text) + Val(TunjanganAnak.Text) End Sub
Private Sub ListView1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListView1.SelectedIndexChanged ListView1.Columns.Add("Nik", 50, HorizontalAlignment.Left) ListView1.Columns.Add("Nama", 80, HorizontalAlignment.Left) ListView1.Columns.Add("Jabatan", 120, HorizontalAlignment.Left) ListView1.Columns.Add("Gaji", 120, HorizontalAlignment.Left) ListView1.Columns.Add("Status", 120, HorizontalAlignment.Left) ListView1.Columns.Add("Tunjangan Istri", 120, HorizontalAlignment.Left) ListView1.Columns.Add("Jumlah Anak", 120, HorizontalAlignment.Left) ListView1.Columns.Add("Tunjangan Anak", 120, HorizontalAlignment.Left) ListView1.Columns.Add("Jam Lembur", 120, HorizontalAlignment.Left) ListView1.Columns.Add("Honor lembur", 120, HorizontalAlignment.Left) ListView1.Columns.Add("Pajak", 90, HorizontalAlignment.Left) ListView1.Columns.Add("Total", 90, HorizontalAlignment.Left) ListView1.View = View.Details ListView1.GridLines = True ListView1.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(TunjanganIstri.Text) lst.SubItems.Add(JumlahAnak.Text) lst.SubItems.Add(TunjanganAnak.Text) lst.SubItems.Add(JamLembur.Text) lst.SubItems.Add(HonorLembur.Text) lst.SubItems.Add(Pajak.Text) lst.SubItems.Add(Total.Text) ListView1.Items.Add(lst) End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click isitabel() 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 Nik.Text = "" Nama.Text = "" Jabatan.Text = "" Gaji.Text = "" Status.Text = "" TunjanganIstri.Text = "" JumlahAnak.Text = "" TunjanganAnak.Text = "" JamLembur.Text = "" HonorLembur.Text = "" Pajak.Text = "" Total.Text = "" End Sub
0 comments:
Post a Comment