Form1
ketikkan program berikut:
Public Class Login
Private Sub btnmasuk_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnmasuk.Click
If username.Text = "Mangasido" And password.Text = "0911876" Then
MenuUtama.Show()
Me.Hide()
Else
MsgBox("USERNAME / PASSWORD SALAH !")
username.Text = ""
password.Text = ""
End If
End Sub
Private Sub btnkeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnkeluar.Click
End
End Sub
End Class
Private Sub btnmasuk_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnmasuk.Click
If username.Text = "Mangasido" And password.Text = "0911876" Then
MenuUtama.Show()
Me.Hide()
Else
MsgBox("USERNAME / PASSWORD SALAH !")
username.Text = ""
password.Text = ""
End If
End Sub
Private Sub btnkeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnkeluar.Click
End
End Sub
End Class
Form2
ketikkan program berikut:
Public Class MenuUtama
Private Sub DataPembayaranPDAMToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DataPembayaranPDAMToolStripMenuItem1.Click
TagihanPDAM.Show()
End Sub
Private Sub KeluarToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KeluarToolStripMenuItem1.Click
End
End Sub
End Class
Private Sub DataPembayaranPDAMToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DataPembayaranPDAMToolStripMenuItem1.Click
TagihanPDAM.Show()
End Sub
Private Sub KeluarToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KeluarToolStripMenuItem1.Click
End
End Sub
End Class
Form3
ketikkan program berikut:
Public Class TagihanPDAM
Private Sub btnproses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnproses.Click
Dim x As String
x = Microsoft.VisualBasic.Left(kodepelanggan.Text, 3)
If x = "TOK" Then
tipepelanggan.Text = "TOKO"
biayabeban.Text = 25000
hargaperm3.Text = 300
ElseIf x = "RUM" Then
tipepelanggan.Text = "RUMAH"
biayabeban.Text = 15000
hargaperM3.Text = 100
ElseIf x = "SWA" Then
tipepelanggan.Text = "SWALAYAN"
biayabeban.Text = 10000
hargaperM3.Text = 200
ElseIf x = "PAB" Then
tipepelanggan.Text = "PABRIK"
biayabeban.Text = 25000
hargaperM3.Text = 500
End If
x = Microsoft.VisualBasic.Mid(kodepelanggan.Text, 4, 1)
If x = "-" Then
End If
x = Microsoft.VisualBasic.Mid(kodepelanggan.Text, 5, 3)
If x = "MED" Then
daerahpelanggan.Text = "MEDAN"
ElseIf x = "BEL" Then
daerahpelanggan.Text = "BELAWAN"
ElseIf x = "TEM" Then
daerahpelanggan.Text = "AKSARA"
ElseIf x = "MAR" Then
daerahpelanggan.Text = "MARENDAL"
ElseIf x = "BIN" Then
daerahpelanggan.Text = "BINJAI"
ElseIf x = "PAK" Then
daerahpelanggan.Text = "LUBUK-PAKAM"
End If
x = Microsoft.VisualBasic.Mid(kodepelanggan.Text, 8, 1)
If x = "-" Then
End If
nourut.Text = Microsoft.VisualBasic.Mid(kodepelanggan.Text, 9, 3)
totaltagihan.Text = Val(biayabeban.Text) + Val(hargaperM3.Text) * Val(jumlahpemakaian.Text)
totaltagihanPPN.Text = (0.01) * Val(totaltagihan.Text) + Val(totaltagihan.Text)
End Sub
Private Sub btnhapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnhapus.Click
kodepelanggan.Text = ""
daerahpelanggan.Text = ""
tipepelanggan.Text = ""
biayabeban.Text = ""
hargaperM3.Text = ""
jumlahpemakaian.Text = ""
totaltagihan.Text = ""
totaltagihanPPN.Text = ""
nourut.Text = ""
End Sub
Private Sub btnkeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnkeluar.Click
End
End Sub
End Class
Private Sub btnproses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnproses.Click
Dim x As String
x = Microsoft.VisualBasic.Left(kodepelanggan.Text, 3)
If x = "TOK" Then
tipepelanggan.Text = "TOKO"
biayabeban.Text = 25000
hargaperm3.Text = 300
ElseIf x = "RUM" Then
tipepelanggan.Text = "RUMAH"
biayabeban.Text = 15000
hargaperM3.Text = 100
ElseIf x = "SWA" Then
tipepelanggan.Text = "SWALAYAN"
biayabeban.Text = 10000
hargaperM3.Text = 200
ElseIf x = "PAB" Then
tipepelanggan.Text = "PABRIK"
biayabeban.Text = 25000
hargaperM3.Text = 500
End If
x = Microsoft.VisualBasic.Mid(kodepelanggan.Text, 4, 1)
If x = "-" Then
End If
x = Microsoft.VisualBasic.Mid(kodepelanggan.Text, 5, 3)
If x = "MED" Then
daerahpelanggan.Text = "MEDAN"
ElseIf x = "BEL" Then
daerahpelanggan.Text = "BELAWAN"
ElseIf x = "TEM" Then
daerahpelanggan.Text = "AKSARA"
ElseIf x = "MAR" Then
daerahpelanggan.Text = "MARENDAL"
ElseIf x = "BIN" Then
daerahpelanggan.Text = "BINJAI"
ElseIf x = "PAK" Then
daerahpelanggan.Text = "LUBUK-PAKAM"
End If
x = Microsoft.VisualBasic.Mid(kodepelanggan.Text, 8, 1)
If x = "-" Then
End If
nourut.Text = Microsoft.VisualBasic.Mid(kodepelanggan.Text, 9, 3)
totaltagihan.Text = Val(biayabeban.Text) + Val(hargaperM3.Text) * Val(jumlahpemakaian.Text)
totaltagihanPPN.Text = (0.01) * Val(totaltagihan.Text) + Val(totaltagihan.Text)
End Sub
Private Sub btnhapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnhapus.Click
kodepelanggan.Text = ""
daerahpelanggan.Text = ""
tipepelanggan.Text = ""
biayabeban.Text = ""
hargaperM3.Text = ""
jumlahpemakaian.Text = ""
totaltagihan.Text = ""
totaltagihanPPN.Text = ""
nourut.Text = ""
End Sub
Private Sub btnkeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnkeluar.Click
End
End Sub
End Class
HASIL DEBUG