Aplikasi Parkir ini dibuat menggunakan Visual Studio 2008 dan Data Base Microsoft
Acces 2007
Berikut ini langkah-langkah pembuatanya,
Buka Visual Studio 2008 pilih new project lalu Windows form application
End Class
CNN.Open()
OLECMD = New OleDbCommand("Update Table1 Set [Jam Keluar]='" &
TextBox6.Text & "' ,[Lama Parkir]='" & TextBox7.Text & "' ,[Biaya]='" &
TextBox9.Text & "' Where [No Antrian]='" & TextBox2.Text & "'", CNN)
x = OLECMD.ExecuteNonQuery
If x = 1 Then
MsgBox("Data berhasil di Simpan", MsgBoxStyle.Information,
"Informasi")
Call bersih()
TextBox2.Focus()
Else
MsgBox("Gagal Menyimpan data", MsgBoxStyle.Exclamation,
"Kesalahan")
End If
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button4.Click
If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox3.Text = ""
Or TextBox4.Text = "" Or TextBox5.Text = "" Or TextBox6.Text = "" Or
TextBox8.Text = "" Or TextBox10.Text = "" Then
MsgBox("Isi data dengan benar!!", MsgBoxStyle.Exclamation,
"Kesalahan")
Exit Sub
End If
If MsgBox("Ingin menghapus data ?", MsgBoxStyle.YesNo,
"Konfirmasi") = MsgBoxResult.Yes Then
CNN = New OleDbConnection(KONEKSI)
If CNN.State <> ConnectionState.Closed Then CNN.Close()
CNN.Open()
OLECMD = New OleDbCommand("Delete from Table1 Where [No
Antrian] ='" & TextBox2.Text & "'", CNN)
x = OLECMD.ExecuteNonQuery
End If
If x = 1 Then
MsgBox("Data berhasil di hapus", MsgBoxStyle.Information,
"Informasi")
Call bersih()
TextBox2.Focus()
Else
MsgBox("Gagal menghapus data", MsgBoxStyle.Exclamation,
"Kesalahan")
End If
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button5.Click
Call bersih()
End Sub
End Class
CNN.Open()
OLECMD = New OleDbCommand("select * from Table1 where [No Antrian]
like'%" & TextBox1.Text & "%'", CNN)
OLERDR = OLECMD.ExecuteReader
OLERDR.Read()
If OLERDR.HasRows Then
OLEDA = New OleDbDataAdapter("select * from Table1 where [No
Antrian] like'%" & TextBox1.Text & "%'", CNN)
DS = New DataSet
OLEDA.Fill(DS, "Ketemu")
DataGridView1.DataSource = DS.Tables("Ketemu")
DataGridView1.ReadOnly = True
End If
End Sub
End Class
Setelah semua form selesai save semua project dan beri nama TM Zery 1, sekarang
buat lah Data Base menggunakan Microsoft Acces seperti berikut :
Table login:
Table1 :
Copyright (c) 2015 http://arcatronik.blogspot.com
Setelah selesai, beri nama DBzery lalu save ke folder project VB tadi yang telah kita
buat, letakkan di dalam folder TM Zery 1/bin/Debug .