Senin, 04 April 2016

UTS Lab Pengantar Pemrograman Bisnis 1





Video ini berisikan apabila form tersebut dijalankan

UTS Lab Pengantar Pemrograman Bisnis 1(Sulthan Andromeda_1506760990)


Form aplikasi diatas adalah sebuah form aplikasi penghitung gaji dari PT Vokasi Indonesia Tbk. seperti yang bisa kita lihat apabila kita memasukkan nama lalu memilih gender dan status maka saat kita menekan process akan muncul gaji kita secara bulanan maupun tahunan. yang unik dari form ini adalah adanya donation, donation disini bertujuan agar para karyawan menyisihkan gajinya untuk donasi kepada yayasan sosial yang setiap bulannya disumbangkan oleh PT Vokasi Indonesia Tbk.

Source Code
Public Class Form1

    Private Sub Label3_Click(sender As Object, e As EventArgs) Handles Label3.Click

    End Sub

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    End Sub

    Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged

    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        If ComboBox3.Text = "1" Then
            TextBox3.Text = "Director"
            TextBox4.Text = "100000000"
        ElseIf ComboBox3.Text = "2" Then
            TextBox3.Text = "General Manager"
            TextBox4.Text = "75000000"
        ElseIf ComboBox3.Text = "3" Then
            TextBox3.Text = "Manager"
            TextBox4.Text = "50000000"
        ElseIf ComboBox3.Text = "4" Then
            TextBox3.Text = "Senior Staff"
            TextBox4.Text = "25000000"
        ElseIf ComboBox3.Text = "5" Then
            TextBox3.Text = "Junior Staff"
            TextBox4.Text = "15000000"
        End If
        Select Case ComboBox2.Text = "Married"
            Case ComboBox1.Text = "Male"
                TextBox6.Text = 10 / 100 * TextBox4.Text
            Case ComboBox1.Text = "Female"
                TextBox6.Text = ""
        End Select
        Select Case ComboBox3.Text
            Case 1, 2
                TextBox5.Text = 20 / 100 * TextBox4.Text
            Case 3, 4
                TextBox5.Text = 15 / 100 * TextBox4.Text
            Case 5
                TextBox5.Text = 10 / 100 * TextBox4.Text
        End Select
        Dim total As Integer
        total = Val(TextBox4.Text) + Val(TextBox5.Text) + Val(TextBox6.Text)
        TextBox7.Text = total

        If total >= "15000000" Then
            TextBox8.Text = Val(2.5 / 100 * TextBox7.Text)

        End If
        TextBox9.Text = Val(TextBox7.Text) - Val(TextBox8.Text)
        TextBox10.Text = TextBox9.Text * 12
    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        TextBox1.Text = ""
        TextBox2.Text = ""
        TextBox3.Text = ""
        TextBox4.Text = ""
        TextBox5.Text = ""
        TextBox6.Text = ""
        TextBox7.Text = ""
        TextBox8.Text = ""
        TextBox9.Text = ""
        ComboBox1.Text = ""
        ComboBox2.Text = ""
        ComboBox3.Text = ""

        Dim x = MsgBox("Save Your Money!")
        If x = MsgBoxResult.Ok Then
            Me.Close()
        End If

    End Sub
End Class