Jumat, Oktober 12
Aplikasi sederhana Gaji kryawan Menggunakan Vb 2010
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim gaji As Integer
Dim anak As Integer
Try
gaji = System.Convert.ToInt32(TextBox1.Text)
Catch
MessageBox.Show("Masukkan gaji")
End Try
If (gaji >= 0 And gaji <= 800000) Then
Label4.Text = " Golongan 1 "
ElseIf (gaji > 800000 And gaji <= 1500000) Then
Label4.Text = " Golongan 2 "
ElseIf (gaji > 1500000 And gaji <= 3000000) Then
Label4.Text = " Golongan 3 "
ElseIf (gaji > 3000000 And gaji <= 5000000) Then
Label4.Text = " Golongan 4 "
ElseIf (gaji > 5000000) Then
Label4.Text = " Eselon "
ElseIf (gaji <= 0) Then
MessageBox.Show("Anda salah memasukan input")
End If
If (RadioButton2.Checked) Then
anak = 0
ElseIf (RadioButton1.Checked) Then
If (ComboBox1.Text = "1") Then
anak = 1 * 200000
ElseIf (ComboBox1.Text = "2") Then
anak = 2 * 200000
ElseIf (ComboBox1.Text = "3") Then
anak = 3 * 200000
ElseIf (ComboBox1.Text = "0") Then
anak = 0
Else
anak = 600000
End If
gaji = gaji + 300000
Else
MessageBox.Show("Anda belum memilih status perkawinan")
End If
TextBox2.Text = gaji + anak
If (gaji > 0 And (RadioButton1.Checked Or RadioButton2.Checked)) Then
End If
End Sub
End Class
Form Desain
Setelat diisi data hasilnya seperti ini :
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar