Dan berikut ini adalah gambar Program Aplikasi Tagihan Air PDAM yang dijalan kan.
Dibawah ini adalah listing dari Program Aplikasi Tagihan Air PDAM.
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Kode_pelanggan.Items.Add("PAB-MED-100")
Kode_pelanggan.Items.Add("RUM-MED-101")
Kode_pelanggan.Items.Add("TOK-BEL-102")
Kode_pelanggan.Items.Add("SWA-MED-103")
End Sub
Private Sub Kode_pelanggan_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Kode_pelanggan.SelectedIndexChanged
Dim x As String
x = Microsoft.VisualBasic.Right(Kode_pelanggan.Text, 3)
Select Case x
Case "100" : Nama.Text = "Frans Avriza Faryanto"
Case "101" : Nama.Text = "Prandika Kelana Muda"
Case "102" : Nama.Text = "Bagas Pradifta"
Case "103" : Nama.Text = "Andika"
End Select
x = Microsoft.VisualBasic.Left(Kode_pelanggan.Text, 3)
Select Case x
Case "TOK"
Harga_M3.Text = 250
Biaya_beban.Text = 15000
Tipe.Text = "TOKO"
Case "RUM"
Harga_M3.Text = 150
Biaya_beban.Text = 10000
Tipe.Text = "RUMAN"
Case "PAB"
Harga_M3.Text = 25000
Biaya_beban.Text = 25000
Tipe.Text = "PABRIK"
Case "SWA"
Harga_M3.Text = 20000
Biaya_beban.Text = 60000
Tipe.Text = "SWALAYAN"
End Select
x = Microsoft.VisualBasic.Mid(Kode_pelanggan.Text, 5, 3)
Select Case x
Case "MED" : Daerah.Text = "Medan"
Case "BEL" : Daerah.Text = "Belawan"
Case Else : Daerah.Text = "-"
End Select
End Sub
Private Sub jml_pemakaian_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles jml_pemakaian.KeyPress
If jml_pemakaian.Text = "" Then
jml_pemakaian.Focus()
ElseIf Asc(e.KeyChar) = 13 Then
Total_tagihan.Text = Val(Biaya_beban.Text) + (Harga_M3.Text * jml_pemakaian.Text)
pajak.Text = 0.01 * Total_tagihan.Text
pembayaran.Text = Val(Total_tagihan.Text) + Val(pajak.Text)
End If
End Sub
Private Sub ButtonHapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonHapus.Click
Kode_pelanggan.Text = ""
Nama.Text = ""
Tipe.Text = ""
Harga_M3.Text = ""
jml_pemakaian.Text = ""
Total_tagihan.Text = ""
pembayaran.Text = ""
Daerah.Text = ""
Biaya_beban.Text = ""
pajak.Text = ""
End Sub
Private Sub ButtonKeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonKeluar.Click
End
End Sub
End Class
Sekian artikel tentang "Membuat Program Aplikasi Tagihan Air PDAM dengan VB.net" Semoga bermanfaat bagi anda.. Terima kasih.
+ comments + 2 comments
mas bisa di ajarin buat aplikasinya lebih mendetail lagi?
bisa pak...
maff pak sya mba2 bukan mas2 :-D
Post a Comment