Pages

Selasa, 10 November 2015

Program Pembayaran Pemakian Air pada VB 2008

* Desainlah terlebih dahulu form dibawah ini!!!


* Setelh anda mendesain formnya
* Ketiklah Koding dibawah ini

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        kp.Items.Add("TOK-MED-100")
        kp.Items.Add("PAB-BEL-101")
        kp.Items.Add("SWA-BEL-102")
        kp.Items.Add("PAB-MED-103")
        kp.Items.Add("RUM-MED-104")
    End Sub

    Private Sub kp_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kp.SelectedIndexChanged
        Dim x As String
        x = Microsoft.VisualBasic.Right(kp.Text, 3)

        If x = "100" Then
            nama.Text = "Edisokhi Waruwu"
        ElseIf x = "101" Then
            nama.Text = "Aperius Giawa"
        ElseIf x = "102" Then
            nama.Text = "Marlina Ndruru"
        ElseIf x = "103" Then
            nama.Text = "Dian Ayu"
        End If

        x = Microsoft.VisualBasic.Left(kp.Text, 3)

        If x = "PAB" Then
            harga.Text = 500
            biaya.Text = 125000
            tipe.Text = "Pabrik"
        ElseIf x = "TOK" Then
            harga.Text = 500
            biaya.Text = 12500
            tipe.Text = "Toko"
        ElseIf x = "RUM" Then
            harga.Text = 500
            biaya.Text = 10000
            tipe.Text = "Rumah"
        ElseIf x = "SWA" Then
            harga.Text = 200
            biaya.Text = 15000
            tipe.Text = "Swalayan"
        End If

        x = Microsoft.VisualBasic.Mid(kp.Text, 5, 3)

        If x = "MED" Then
            daerah.Text = ("Medan")
        ElseIf x = "BEL" Then
            daerah.Text = "Belawan"
        End If

    End Sub

    Private Sub pemakian_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles pemakian.KeyPress

        If Asc(e.KeyChar) = 13 Then
            total.Text = harga.Text * pemakian.Text + Val(biaya.Text)
            pajak.Text = 0.01 * total.Text
            pembayaran.Text = Val(total.Text) + Val(pajak.Text)
        End If

    End Sub
    Private Sub btnhapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnhapus.Click
        kp.Text = ""
        nama.Text = ""
        tipe.Text = ""
        total.Text = ""
        harga.Text = ""
        pajak.Text = ""
        pembayaran.Text = ""
        pemakian.Text = "'"
        daerah.Text = ""
        biaya.Text = ""
    End Sub

    Private Sub btnKeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnKeluar.Click
        End
    End Sub
End Class

* Inilah tampilan Hasilnya................



Semoga bermanfaat bagi kita semua... syallom

1 komentar:

  1. How to download and install Pragmatic Play casino games
    How 남양주 출장마사지 to download and install Pragmatic Play 전주 출장마사지 casino games — How to 경기도 출장샵 download and install Pragmatic 군산 출장안마 Play casino games. In other words, you can download, download, 태백 출장마사지

    BalasHapus