Yuk! Belajar Pemrograman Visual Basic dot Net Di Mesran.Net

Informasi Pembayaran Tagihan PDAM







Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        lv.Columns.Add("Kode", 80, HorizontalAlignment.Center)
        lv.Columns.Add("Nama", 100, HorizontalAlignment.Left)
        lv.Columns.Add("Tipe", 90, HorizontalAlignment.Left)
        lv.Columns.Add("Biaya Beban", 90, HorizontalAlignment.Left)
        lv.Columns.Add("Harga", 95, HorizontalAlignment.Left)
        lv.Columns.Add("Jumlah Pemakaian", 105, HorizontalAlignment.Left)
        lv.Columns.Add("Total Tagihan", 100, HorizontalAlignment.Left)
        lv.Columns.Add("Pajak", 70, HorizontalAlignment.Left)
        lv.Columns.Add("Pembayaran", 90, HorizontalAlignment.Left)
        lv.View = View.Details
        lv.GridLines = True
        lv.FullRowSelect = True

        For i = 1 To 3
            kd_pelanggan.Items.Add("00" & i)
        Next

        tipe.Items.Add("TOKO")
        tipe.Items.Add("RUMAH")
        tipe.Items.Add("SWALAYAN")
        tipe.Items.Add("PABRIK")
    End Sub

    Private Sub kd_pelanggan_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kd_pelanggan.SelectedIndexChanged
        Select Case kd_pelanggan.Text
            Case "001" : nama.Text = "Jhoni"
            Case "002" : nama.Text = "Eko"
            Case "003" : nama.Text = "Dian"
        End Select
    End Sub

    Private Sub tipe_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tipe.SelectedIndexChanged
        Select Case tipe.Text
            Case "TOKO"
                biaya.Text = 25000
                harga.Text = 300
            Case "RUMAH"
                biaya.Text = 15000
                harga.Text = 100
            Case "SWALAYAN"
                biaya.Text = 10000
                harga.Text = 200
            Case "PABRIK"
                biaya.Text = 250000
                harga.Text = 500
        End Select
    End Sub

    Private Sub proses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles proses.Click
        total_tagihan.Text = Val(biaya.Text) + Val(harga.Text) * Val(jlh_pemakaian.Text)

        pajak.Text = 0.01 * total_tagihan.Text

        pembayaran.Text = Val(total_tagihan.Text) + Val(pajak.Text)

        Dim lst As New ListViewItem
        lst.Text = kd_pelanggan.Text
        lst.SubItems.Add(nama.Text)
        lst.SubItems.Add(tipe.Text)
        lst.SubItems.Add(biaya.Text)
        lst.SubItems.Add(harga.Text)
        lst.SubItems.Add(jlh_pemakaian.Text)
        lst.SubItems.Add(total_tagihan.Text)
        lst.SubItems.Add(pajak.Text)
        lst.SubItems.Add(pembayaran.Text)
        lv.Items.Add(lst)
    End Sub

    Private Sub hapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles hapus.Click
        lv.Items.Clear()

        kd_pelanggan.Text = ""
        nama.Text = ""
        tipe.Text = ""
        biaya.Text = ""
        harga.Text = ""
        jlh_pemakaian.Text = ""
        total_tagihan.Text = ""
        pajak.Text = ""
        pembayaran.Text = ""
    End Sub

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




Demikianlah postingan saya  Nama : (IRWAN GULO)  NPM : (14110324)
Selamat Belajar Pemrograman VB NET
Yuk! Belajar Pemrograman Visual Basic dot Net Di Mesran.Net Yuk! Belajar Pemrograman Visual Basic dot Net Di Mesran.Net Reviewed by Pak Gulo on November 29, 2015 Rating: 5

Tidak ada komentar:

Diberdayakan oleh Blogger.