Lencana Facebook
Driver Downloads
Halaman
Blog Archive
Entri Populer
Followers
Jumat, 27 Januari 2012
Jawaban SOAL 3 (Hamdan.M)
04.56 |
Diposting oleh
NE-O
Listing Program Logint:
Public Class FormLogint
Private Sub Btnok_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnok.Click
If Username.Text = "Hamdan" And Password.Text = "123" Then
FormMenu.Show()
Me.Hide()
Else
MsgBox("Maaf! Password salah!")
Username.Text = ""
Password.Text = ""
End If
End Sub
Private Sub Keluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Keluar.Click
End
End Sub
End Class
Listing Program FormMenu :
Public Class FormMenu
Private Sub PenggajianKaryawanToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PenggajianKaryawanToolStripMenuItem.Click
Form1.Show()
End Sub
Private Sub KeluarToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KeluarToolStripMenuItem.Click
End
End Sub
End Class
Listing Program Form1 (gaji pegawai) :
Public Class Form1
Public Class Form1
Sub buattabel()
LV.Columns.Add("NIK", 50, HorizontalAlignment.Center)
LV.Columns.Add("Nama", 100, HorizontalAlignment.Left)
LV.Columns.Add("Jabatan", 70, HorizontalAlignment.Left)
LV.Columns.Add("Gaji Pokok", 70, HorizontalAlignment.Left)
LV.Columns.Add("Status", 70, HorizontalAlignment.Left)
LV.Columns.Add("Jumlah Anak", 80, HorizontalAlignment.Left)
LV.Columns.Add("Tunjangan Istri", 80, HorizontalAlignment.Left)
LV.Columns.Add("Tunjangan Anak", 80, HorizontalAlignment.Left)
LV.Columns.Add("Pajak", 70, HorizontalAlignment.Left)
LV.Columns.Add("Lembur", 70, HorizontalAlignment.Left)
LV.Columns.Add("Jam Lembur", 70, HorizontalAlignment.Left)
LV.Columns.Add("Total Gaji", 70, 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(gapok.Text)
Lst.SubItems.Add(Stts.Text)
Lst.SubItems.Add(J_Ank.Text)
Lst.SubItems.Add(T_Istri.Text)
Lst.SubItems.Add(T_Ank.Text)
Lst.SubItems.Add(pajak.Text)
Lst.SubItems.Add(lembur.Text)
Lst.SubItems.Add(lemb.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
buattabel()
jabatan.Items.Add("Mandor")
jabatan.Items.Add("Kepala Bagian")
jabatan.Items.Add("Staf")
NIK.Items.Add("001")
NIK.Items.Add("002")
NIK.Items.Add("003")
NIK.Items.Add("004")
Stts.Items.Add("MENIKAH")
Stts.Items.Add("LAJANG")
End Sub
Sub clearisian()
NIK.Text = ""
Nama.Text = ""
jabatan.Text = ""
gapok.Text = ""
Stts.Text = ""
J_Ank.Text = ""
T_Istri.Text = ""
T_Ank.Text = ""
pajak.Text = ""
lemb.Text = ""
lembur.Text = ""
Total.Text = ""
NIK.Focus()
End Sub
Private Sub Gol_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles jabatan.SelectedIndexChanged
If jabatan.Text = "Mandor" Then
gapok.Text = 1750000
ElseIf jabatan.Text = "Kepala Bagian" Then
gapok.Text = 2500000
ElseIf jabatan.Text = "Staf" Then
gapok.Text = 1250000
Else
gapok.Text = 0
End If
End Sub
Private Sub Stts_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Stts.SelectedIndexChanged
If Stts.Text = "LAJANG" Then
T_Istri.Text = 0
T_Ank.Text = 0
J_Ank.Text = 0
ElseIf Stts.Text = "MENIKAH" Then
T_Istri.Text = 0.9 / 100 * gapok.Text
End If
End Sub
Private Sub btnProses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnProses.Click
If J_Ank.Text = 1 Then
T_Ank.Text = J_Ank.Text * (0.3 / 100 * gapok.Text)
ElseIf J_Ank.Text < 2 Then
T_Ank.Text = J_Ank.Text * (0.7 / 100 * gapok.Text)
End If
pajak.Text = Val(1.5 / 100 * gapok.Text)
Total.Text = Val(gapok.Text) + Val(T_Ank.Text) + Val(T_Istri.Text) + Val(lembur.Text) - Val(pajak.Text)
isitabel()
NIK.Text = ""
Nama.Text = ""
jabatan.Text = ""
gapok.Text = ""
Stts.Text = ""
J_Ank.Text = ""
T_Istri.Text = ""
T_Ank.Text = ""
pajak.Text = ""
lembur.Text = ""
lemb.Text = ""
Total.Text = ""
End Sub
Private Sub NIK_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NIK.SelectedIndexChanged
If NIK.Text = "001" Then
Nama.Text = "BUDI"
ElseIf NIK.Text = "002" Then
Nama.Text = "UDIN"
ElseIf NIK.Text = "003" Then
Nama.Text = "ANDUK"
ElseIf NIK.Text = "004" Then
Nama.Text = "PEPY"
End If
End Sub
Private Sub btnHapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnHapus.Click
Call clearisian()
End Sub
Private Sub btnKeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnKeluar.Click
End
End Sub
Private Sub gapok_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gapok.TextChanged
End Sub
Private Sub lemb_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lemb.TextChanged
If jabatan.Text = "Mandor" Then
lembur.Text = lemb.Text * 7500
ElseIf jabatan.Text = "Kepala Bagian" Then
lembur.Text = lemb.Text * 1000
ElseIf jabatan.Text = "Staf" Then
lembur.Text = lemb.Text * 5000
Else
lembur.Text = 0
End If
End Sub
End Class
Label:
Quiz
Langganan:
Posting Komentar (Atom)
Like This Yo...!!
Translate this Blog
Chat Box
Label
- aksi bakar ban (1)
- Bai Fang Li Tukang Becak yang Berhati Mulia (1)
- cheat empire dan allies (1)
- Info keren (37)
- Info Music (14)
- Mengapa orang korupsi ? Analisa psikologi (1)
- Music Album (11)
- Prospek di masa depan mahasiswa TI dan mahasiswa SI (1)
- Quiz (2)
- Script VB Untuk Konversi Bilangan Desimal Ke Biner dan Biner Ke Desimal (1)
- Tips dan Trik (14)
- Tips danTrik Komputer (22)
0 komentar:
Posting Komentar