VB.Net - Penggajian

on Kamis, 21 Desember 2017






No.
Kontrol
Properties
1
Label1
Text = Nama
2
Label2
Text = Status
3
Label3
Text = Jumlah Anak
4
Label4
Text = Gaji Pokok
5
Label5
Text = Tunjangan Istri
6
Label6
Text = Tunjangan Anak
7
Label7
Text = PPh
8
Label8
Text = Total Gaji
9
Label9
Text = Gaji Bersih
10
Textbox1
Name = txtNama
11
Combobox1
Name = cbStatus
Items =
Menikah
Belum Menikah
12
NumericUpDown1
Name =nudAnak
13
Textbox2
Name = txtGapok
14
Textbox3
Name = txtTIstri
Readonly=true
15
Textbox4
Name = txtTAnak
Readonly=true
16
Textbox5
Name = txtPPh
Readonly=true
17
Textbox6
Name = txtTotal
Readonly=true
18
Textbox7
Name = txtGaber
Readonly=true
19
Button1
Name = btnHitung
Text = Hitung
20
Button2
Name = btnKeluar
Text = Keluar








































Public Class Form1
    
    Private Sub btnHitung_Click(sender As Object, e As EventArgs) Handles btnHitung.Click
        If cbStatus.Text = "Menikah" Then
            txtTIstri.Text = 250000
        Else
            txtTIstri.Text = 0
        End If
        If NumAnak.Value < 3 Then
            txtTAnak.Text = NumAnak.Value * 200000
        Else
            txtTAnak.Text = 3 * 200000
        End If
        txtPPh.Text = 0.05 * Val(txtGapok.Text)
        txtTotal.Text = Val(txtGapok.Text) + Val(txtTIstri.Text) + Val(txtTAnak.Text)
        txtGaber.Text = Val(txtTotal.Text) - Val(txtPPh.Text)
    End Sub
End Class

0 komentar: