Sabtu, 01 Juni 2013

Yuk! Belajar Pemrograman Visual Basic dot Net Di Mesran.Net BAGIAN-2

JUDUL SOAL : MENAMPILKAN OUTPUT GAJI PEGAWAI PT.TELKOM


Berikut JAWABAN Program :
Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        golongan.Items.Add("IIIA")
        golongan.Items.Add("IIIB")
        golongan.Items.Add("IIIC")
    End Sub

    Private Sub golongan_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles golongan.SelectedIndexChanged
        If golongan.Text = "IIIA" Then
            gaji.Text = 1500000
        ElseIf golongan.Text = "IIIB" Then
            gaji.Text = 2500000
        Else
            gaji.Text = 3500000
        End If
    End Sub

    Private Sub proses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles proses.Click
        pajak.Text = 0.015 * Val(gaji.Text)
        gaber.Text = Val(gaji.Text) - Val(pinjaman.Text)
    End Sub

    Private Sub hapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles hapus.Click
        nama.Text = ""
        golongan.Text = ""
        gaji.Text = ""
        pajak.Text = ""
        gaber.Text = ""
        pinjaman.Text = ""
    End Sub

    Private Sub keluar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles keluar.Click
        Me.Close()
    End Sub
End Class

Dah, selesai deh



Demikilahlah postingan saya  Nama : (Dwi Riski Purnamasari)  NPM : (1111240)

0 komentar:

Posting Komentar

Template by:

Free Blog Templates