Public Class Form1
Private Sub BtnLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnLogin.Click
If User.Text = "Fizay" And Pass.Text = "kombet" Then
Form2.Show()
Else
MsgBox("Data anda salah!!")
User.Text = ""
Pass.Text = ""
End If
End Sub
Public Class Form2
Private Sub PdamToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PdamToolStripMenuItem.Click
Form3.Show()
End Sub
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Public Class Form3
Private Sub Kode_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Kode.SelectedIndexChanged
Dim a As String
a = Microsoft.VisualBasic.Right(Kode.Text, 3)
No_Urut.Text = a
If Microsoft.VisualBasic.Left(Kode.Text, 3) = "TOK" Then
Type_P.Text = "Toko"
beban.Text = 25000
harga_m3.Text = 300
ElseIf Microsoft.VisualBasic.Left(Kode.Text, 3) = "RUM" Then
Type_P.Text = "Rumah"
beban.Text = 15000
harga_m3.Text = 100
ElseIf Microsoft.VisualBasic.Left(Kode.Text, 3) = "SWA" Then
Type_P.Text = "Swalayan"
beban.Text = 10000
harga_m3.Text = 200
ElseIf Microsoft.VisualBasic.Left(Kode.Text, 3) = "PAB" Then
Type_P.Text = "Pabrik"
beban.Text = 250000
harga_m3.Text = 500
End If
If Microsoft.VisualBasic.Mid(Kode.Text, 5, 3) = "MED" Then
Nama_Daerah.Text = "Medan"
ElseIf Microsoft.VisualBasic.Mid(Kode.Text, 5, 3) = "BEL" Then
Nama_Daerah.Text = "Belawan"
ElseIf Microsoft.VisualBasic.Mid(Kode.Text, 5, 3) = "MAR" Then
Nama_Daerah.Text = "Marendal"
ElseIf Microsoft.VisualBasic.Mid(Kode.Text, 5, 3) = "BIN" Then
Nama_Daerah.Text = "Binjay"
ElseIf Microsoft.VisualBasic.Mid(Kode.Text, 5, 3) = "TEM" Then
Nama_Daerah.Text = "Aksara"
ElseIf Microsoft.VisualBasic.Mid(Kode.Text, 5, 3) = "PAK" Then
Nama_Daerah.Text = "Lubuk Pakam"
End If
End Sub
Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Kode.Items.Add("TOK-MED-101")
Kode.Items.Add("TOK-BEL-102")
Kode.Items.Add("TOK-TEM-103")
Kode.Items.Add("TOK-MAR-104")
Kode.Items.Add("TOK-BIN-105")
Kode.Items.Add("TOK-PAK-106")
Kode.Items.Add("RUM-MED-107")
Kode.Items.Add("RUM-BEL-108")
Kode.Items.Add("RUM-TEM-109")
Kode.Items.Add("RUM-MAR-110")
Kode.Items.Add("RUM-BIN-111")
Kode.Items.Add("RUM-PAK-112")
Kode.Items.Add("SWA-MED-113")
Kode.Items.Add("SWA-BEL-114")
Kode.Items.Add("SWA-TEM-115")
Kode.Items.Add("SWA-MAR-116")
Kode.Items.Add("SWA-BIN-117")
Kode.Items.Add("SWA-PAK-118")
Kode.Items.Add("PAB-MED-001")
Kode.Items.Add("PAB-BEL-001")
Kode.Items.Add("PAB-TEM-001")
Kode.Items.Add("PAB-MAR-001")
Kode.Items.Add("PAB-BIN-001")
Kode.Items.Add("PAB-PAK-001")
End Sub
Private Sub RR_perhari_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles RR_perhari.KeyPress
If Asc(e.KeyChar) = 13 Then
bayar_perbulan.Text = RR_perhari.Text * 30
total_tagihan.Text = bayar_perbulan.Text * harga_m3.Text + Val(beban.Text)
pajak.Text = 0.01 * total_tagihan.Text
pembayaran.Text = Val(total_tagihan.Text) + Val(pajak.Text)
End If
End Sub
Private Sub BtnHapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnHapus.Click
Kode.Text = ""
No_Urut.Text = ""
Nama_Daerah.Text = ""
Type_P.Text = ""
beban.Text = ""
harga_m3.Text = ""
RR_perhari.Text = ""
bayar_perbulan.Text = ""
total_tagihan.Text = ""
pajak.Text = ""
pembayaran.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
Tidak ada komentar:
Posting Komentar