Private Sub btnkeluar_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles btnkeluar.Click
Close()
End Sub
Private Sub btnok_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles btnok.Click
If
user.Text = "sulaiman" And pwd.Text = "silalahi"
Then
Form_Menu.Show()
Me.Hide()
Else
MsgBox("MaaF!
PAsword Salah!")
user.Text = ""
pwd.Text = ""
End If
End Sub
Private Sub Form1_Load(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Form_Menu.Show()
End Sub
End Class
Public Class Form_Menu
Private Sub ExitToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As
System.EventArgs) Handles
ExitToolStripMenuItem.Click
End
End Sub
Private Sub DataKaryawanToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As
System.EventArgs) Handles
DataKaryawanToolStripMenuItem.Click
Form_DataKaryawan.Show()
End Sub
End Class
Public Class Form_DataKaryawan
Private Sub keluar_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles keluar.Click
Close()
End Sub
Private Sub Hapus_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles Hapus.Click
Call
addapus()
End Sub
Sub
buattabel()
LV.Columns.Add("Golongan",
80, HorizontalAlignment.Center)
LV.Columns.Add("Gaji
Pokok", 180, HorizontalAlignment.Center)
LV.Columns.Add("pajak",
100, HorizontalAlignment.Center)
LV.Columns.Add("Status
Kerja", 50, HorizontalAlignment.Center)
LV.Columns.Add("Jam
Lembur", 50, HorizontalAlignment.Center)
LV.Columns.Add("Upah
Lembur", 100, HorizontalAlignment.Center)
LV.Columns.Add("Status",
100, HorizontalAlignment.Center)
LV.Columns.Add("Jumlah
Anak", 120, HorizontalAlignment.Center)
LV.Columns.Add("Tunjangan
Istri", 120, HorizontalAlignment.Center)
LV.Columns.Add("Tunjangan
Anak", 120, HorizontalAlignment.Center)
LV.Columns.Add("Total
Gaji", 100, HorizontalAlignment.Center)
LV.View = View.Details
LV.GridLines = True
LV.FullRowSelect = True
End Sub
Sub isitabel()
Dim Lst
As New
ListViewItem
Lst.Text = gol.Text
Lst.SubItems.Add(gajpokok.Text)
Lst.SubItems.Add(pajak.Text)
Lst.SubItems.Add(Slembur.Text)
Lst.SubItems.Add(jamlembur.Text)
Lst.SubItems.Add(lembur.Text)
Lst.SubItems.Add(status.Text)
Lst.SubItems.Add(jmlanak.Text)
Lst.SubItems.Add(tunjanganistri.Text)
Lst.SubItems.Add(tunjangananak.Text)
Lst.SubItems.Add(totgaji.Text)
LV.Items.Add(Lst)
End Sub
Private Sub addapus()
lembur.Text = ""
gol.Text = ""
gajpokok.Text = ""
pajak.Text = ""
status.Text = ""
jmlanak.Text = ""
tunjanganistri.Text = ""
tunjangananak.Text = ""
totgaji.Text = ""
jamlembur.Text = ""
Slembur.Text = ""
gol.Focus()
End Sub
Private Sub proses_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles proses.Click
totgaji.Text = Val(gajpokok.Text) +
Val(tunjangananak.Text) + Val(tunjanganistri.Text) + Val(lembur.Text) -
Val(pajak.Text)
End Sub
Private Sub Form1_Load(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
gol.Items.Add("Mandor")
gol.Items.Add("Kepala
Bagian")
gol.Items.Add("Staf")
Slembur.Items.Add("Lembur")
Slembur.Items.Add("Tidak Lembur")
status.Items.Add("MENIKAH")
status.Items.Add("BELUM MENIKAH")
jmlanak.Enabled = False
Dim i As Integer
For i =
1 To 5
jamlembur.Items.Add(i)
Next
buattabel()
End Sub
Private Sub gol_SelectedIndexChanged(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles
gol.SelectedIndexChanged
If gol.Text
= "Mandor" Then
gajpokok.Text = 1750000
pajak.Text = (0.015 *
Val(gajpokok.Text))
ElseIf
gol.Text = "Kepala Bagian" Then
gajpokok.Text = 2500000
pajak.Text = (0.015 *
Val(gajpokok.Text))
ElseIf gol.Text = "Staf"
Then
gajpokok.Text = 1250000
pajak.Text = (0.015 *
Val(gajpokok.Text))
Else
gajpokok.Text = 0
End If
End Sub
Private Sub status_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As
System.EventArgs) Handles
status.SelectedIndexChanged
If
status.Text = "BELUM MENIKAH" Then
tunjangananak.Text = 0
tunjanganistri.Text = 0
jmlanak.Enabled = False
ElseIf
status.Text = "MENIKAH" Then
jmlanak.Enabled = True
tunjanganistri.Text = (0.09 *
Val(gajpokok.Text))
End If
End Sub
Private Sub jmlanak_TextChanged(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles jmlanak.TextChanged
If
jmlanak.Text = "" Then