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)
Select Case x
Case
"100" : Nama.Text = "Muhammad Ardianto"
Case
"101" : Nama.Text = "Jekson Sinaga"
Case
"102" : Nama.Text = "Triani Arista"
Case
"103" : Nama.Text = "Aldyan"
End Select
x = Microsoft.VisualBasic.Left(KP.Text,
3)
Select Case x
Case
"PAB"
HargaM3.Text = 500
BBeban.Text = 250000
Tipe.Text = "Pabrik"
Case
"TOK"
HargaM3.Text = 500
BBeban.Text = 25000
Tipe.Text = "Toko"
Case
"RUM"
HargaM3.Text = 500
BBeban.Text = 10000
Tipe.Text = "Rumah"
Case
"SWA"
HargaM3.Text = 200
BBeban.Text = 15000
Tipe.Text = "Swalayan"
End Select
x = Microsoft.VisualBasic.Mid(KP.Text,
5, 3)
Select Case x
Case
"MED" : Daerah.Text = "Medan"
Case
"BEL" : Daerah.Text = "Belawan"
End Select
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
0 comments:
Post a Comment
Terima kasih apabila sudah memberikan komentar yang baik dan sopan :)