PROGRAM PEMBAYARAN LISTRIK DENGAN VB NET
http://www.mesran.blogspot.com
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim x As String
No_urut.Text = "1" & Microsoft.VisualBasic.Right(KODE.Text, 2)
x = Microsoft.VisualBasic.Mid(KODE.Text, 4, 3)
If x = "MED" Then
daerah.Text = "MEDAN"
pajak.Text = 0.015
ElseIf x = "BEL" Then
daerah.Text = "BELAWAN"
pajak.Text = 0.015
ElseIf x = "TEM" Then
daerah.Text = "AKSARA"
pajak.Text = 0.015
ElseIf x = "MAR" Then
daerah.Text = "MARENDAL"
pajak.Text = 0.015
ElseIf x = "BIN" Then
daerah.Text = "BINJAI"
pajak.Text = 0.015
ElseIf x = "PAK" Then
daerah.Text = "LUBUK PAKAM"
pajak.Text = 0.015
End If
x = Microsoft.VisualBasic.Mid(KODE.Text, 1, 3)
If x = "TOK" Then
TIPE.Text = "TOKO"
HARGA.Text = "500"
BEBAN.Text = "150000"
ElseIf x = "RUM" Then
TIPE.Text = "RUMAH"
HARGA.Text = "200"
BEBAN.Text = "50000"
ElseIf x = "SWA" Then
TIPE.Text = "SWALAYAN"
HARGA.Text = "1500"
BEBAN.Text = "400000"
ElseIf x = "PAB" Then
TIPE.Text = "PABRIK"
BEBAN.Text = "1000000"
HARGA.Text = "10000"
End If
End Sub
Private Sub Btnproses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnproses.Click
BESAR.Text = SEKARANG.Text - LALU.Text
tagihan.Text = BEBAN.Text + (HARGA.Text * BESAR.Text)
total.Text = tagihan.Text * 0.015
End Sub
Private Sub meteranbulanlalu_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LALU.TextChanged
End Sub
End Sub
Private Sub Btnreset_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnreset.Click
KODE.Text = ""
daerah.Text = ""
BEBAN.Text = ""
TIPE.Text = ""
LALU.Text = ""
HARGA.Text = ""
total.Text = ""
SEKARANG.Text = ""
No_urut.Text = ""
tagihan.Text = ""
BESAR.Text = ""
PAJAK.Text = ""
End Sub
End Class
Komentar
Posting Komentar