Home » » Pemakaian IF ELSE dalam Penyelesaian Pembayaran Tagihan Air Minum Menggunakan Visual Basic dot Net

Pemakaian IF ELSE dalam Penyelesaian Pembayaran Tagihan Air Minum Menggunakan Visual Basic dot Net

Written By Mesran on Friday, 22 November 2013 | 09:12

Berikut ini program untuk menyelesaikan pembayaran tagihan air minum.


















Program penyelesaian pembayaran tagihan air minum menggunakan Visual Basic dot Net


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 = "Muhammad Ardianto"
        ElseIf x = "101" Then
            Nama.Text = "Jekson Sinaga"
        ElseIf x = "102" Then
            Nama.Text = "Triani Arista"
        ElseIf x = "103" Then
            Nama.Text = "Aldyan"
        End If


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

        If x = "PAB" Then
            HargaM3.Text = 500
            BBeban.Text = 250000
            Tipe.Text = "Pabrik"
        ElseIf x = "TOK" Then
            HargaM3.Text = 500
            BBeban.Text = 25000
            Tipe.Text = "Toko"
        ElseIf x = "RUM" Then
            HargaM3.Text = 500
            BBeban.Text = 10000
            Tipe.Text = "Rumah"
        ElseIf x = "SWA" Then
            HargaM3.Text = 200
            BBeban.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 Pemakaian_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Pemakaian.KeyPress
        If Asc(e.KeyChar) = 13 Then
            TTagihan.Text = HargaM3.Text * Pemakaian.Text + Val(BBeban.Text)
            Pajak.Text = 0.01 * TTagihan.Text
            Pembayaran.Text = Val(TTagihan.Text) + Val(Pajak.Text)
        End If
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        End
    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 = ""
        TTagihan.Text = ""
        HargaM3.Text = ""
        Pajak.Text = ""
        Pembayaran.Text = ""
        Pemakaian.Text = ""
        Daerah.Text = ""
        BBeban.Text = ""
    End Sub
End Class


Demikianlah program penyelesaian pembayaran tagihan air minum menggunakan Visual Basic dot Net

























10 comments:

  1. Nama : Lidia Sunarti Tambunan
    NPM : 12110861
    Kelas : TI-P1203

    link : http//lidiasunarti.blogspot.com/2013/12/08/Pemakaian-IF-ELSE-dalam-Penyelesaian-Pembayaran-Tagihan-Air-Minum-Menggunakan-Visual-Basic-dot-Net

    ReplyDelete
  2. NAMA : IRMA SUSANTI
    NPM : 12110009

    http://irmasusanti2.blogspot.com/2013/12/normal-0-false-false-false-en-us-zh-cn.html

    ReplyDelete
  3. Nama : Lidia Hotriani Saragih
    Npm : 12110657
    Kelas : TI-P1206

    http://lidiaazah.blogspot.com/2013/12/pemakain-if-else-dalam-penyelesaianhtml.html

    ReplyDelete
  4. Nama : Rumini Elisabet Silalahi
    Npm : 12110658
    kelas: TI-P1206

    http://ruminielisabet10.blogspot.com/2013/12/quis-no1.html

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. nama :byiandri
      http://www.blogger.com/blogger.g?blogID=4297391182846630867#editor/target=post;postID=5053078293543980134;onPublishedMenu=allposts;onClosedMenu=allposts;postNum=0;src=

      Delete
  6. nama;biyandri simamora

    http://www.blogger.com/blogger.g?blogID=4297391182846630867#editor/target=post;postID=5053078293543980134;onPublishedMenu=allposts;onClosedMenu=allposts;postNum=0;src=

    ReplyDelete
  7. nama :nelson sillalahi
    npm :12110517

    http://nelsonsilalahi.blogspot.com/2013/12/tugas-quiz.html

    ReplyDelete
  8. nama :riko krisno simatupang
    Npm :12110463

    tugas quis
    http://rikokrisno.blogspot.com/2013/12/tugas-quis.html

    ReplyDelete
  9. nama :sabdan husin
    kelas : TI-M1210
    NPM : 12110363

    http://gubukbambusetiajadi.blogspot.com/2013/12/public-class-form1-sub-form1loadbyval.html

    ReplyDelete

Terima kasih apabila sudah memberikan komentar yang baik dan sopan :)