Public Class Latihan27_035 Dim go As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =D:\materi kuliah II\semester 5\VB\LATIHAN 27-34 SIMPAN EDIT DELETE DATA\DATABARANG.accdb") Dim isi As New ByIskandar.CariKeDataBaseByIskandar Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1035.Click 'perintah periksa data If t1035.Text.Length = 0 Then MsgBox("Please Insert Your Text") Exit Sub End If
If t2035.Text.Length = 0 Then MsgBox("Please Insert Your Text") Exit Sub End If
If Val(t3035.Text) = 0 Then MsgBox("Please Insert Your Text") Exit Sub End If
If Val(t4035.Text) = 0 Then MsgBox("Please Insert Your Text") Exit Sub End If
'perintah ambil data 'Dim aku As New OleDb.OleDbCommand("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =C:\users\andihabibi\My Documents\latihan 15-26 mengakses data on 10.0.7.1\DataTransaksiJualBeli.accdb") isi.AturPencarianDataBase("BARANG", "KODEBARANG", t1035.Text, 1, go)
If isi.JumlanBaris > 0 Then MsgBox("The data has been exist please insert new data")
'mengosongkan text box t1035.Text = "" t2035.Text = "" t3035.Text = "" t4035.Text = "" Exit Sub End If
'deklarasi object command Dim Cm As New OleDb.OleDbCommand Cm = New OleDb.OleDbCommand("INSERT INTO BARANG (KODEBARANG, NAMABARANG, HARGAJUAL, JUMLAHBARANG) VALUES ('" & t1035.Text & "','" & t2035.Text & "', " & Val(t3035.Text) & "," & Val(t4035.Text) & ")", go) go.Open() Cm.ExecuteNonQuery() go.Close() Cm.Dispose()
'mengosongkan text box t1035.Text = "" t2035.Text = "" t3035.Text = "" t4035.Text = "" End Sub End Class
Dim connect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=H:\berbagi\sharing2\LATIHAN 27-34 SIMPAN EDIT DELETE DATA\DATABARANG.accdb") Dim cari As New ByIskandar.CariKeDataBaseByIskandar
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If textbox136109055.Text.Length = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If
If textbox236109055.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If
If Val(textbox336109055.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(textbox436109055.Text) = 0 Then MsgBox("jumlah barang belum diisi") Exit Sub End If
If cari.JumlanBaris > 0 Then MsgBox("kode sudah ada") Exit Sub End If
Dim com As New OleDb.OleDbCommand com = New OleDb.OleDbCommand("insert into BARANG (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & textbox136109055.Text & "','" & textbox236109055.Text & "'," & Val(textbox336109055.Text) & "," & Val(textbox436109055.Text) & ")", connect)
Public Class Latihan2736109046 Dim connect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=D:\Qulyah\SEM 5\APKOM 4:\berbagi\sharing2\LATIHAN 27-34 SIMPAN EDIT DELETE DATA\ByIskandar.accdb") Dim cari As New ByIskandar.CariKeDataBaseByIskandar
Private Sub Button136109046_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109046.Click If t136109046.Text.Length = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If
If t236109046.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If
If Val(t336109046.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(t436109046.Text) = 0 Then MsgBox("jumlah barang belum diisi") Exit Sub End If
If cari.JumlanBaris > 0 Then MsgBox("kode sudah ada") Exit Sub End If
Dim com As New OleDb.OleDbCommand com = New OleDb.OleDbCommand("insert into BARANG (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & t136109046.Text & "','" & t236109046.Text & "'," & Val(t336109046.Text) & "," & Val(t436109046.Text) & ")", connect)
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\databarang.accdb") Dim browse As New DataTable
Private Sub Button136109033_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109033.Click Dim tiwi As New OleDb.OleDbDataAdapter("select count(*) as coba from barang where kodebarang ='" & t136109033.Text & "'", CONECT) browse.Rows.Clear() tiwi.Fill(browse) If browse.Rows(0).Item("coba") > 0 Then MsgBox("kode barang sudah ada") Else pratiwi() End If Data()
Dim com As New OleDb.OleDbCommand com = New OleDb.OleDbCommand("insert into BARANG (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & t136109033.Text & "','" & t236109033.Text & "'," & Val(t336109033.Text) & "," & Val(t436109033.Text) & ")", CONECT)
Public Sub data() If Val(t136109033.Text) = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If If t236109033.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If
If Val(t336109033.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(t436109033.Text) = 0 Then MsgBox("jumlah barang belum diisi") Exit Sub End If End Sub End Class
Public Class LATIHAN_027_36109056 Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb") Dim cari As New ByIskandar.CariKeDataBaseByIskandar
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Val(Textbox1_36109056.Text) = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If
If Textbox2_36109056.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If
If Val(Textbox3_36109056.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(Textbox4_36109056.Text) = 0 Then MsgBox("jumlah barang belum diisi") Exit Sub End If
If cari.JumlanBaris > 0 Then MsgBox("kode sudah ada") Exit Sub End If
Dim com As New OleDb.OleDbCommand com = New OleDb.OleDbCommand("insert into BARANG (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & Textbox1_36109056.Text & "','" & Textbox2_36109056.Text & "'," & Val(Textbox3_36109056.Text) & "," & Val(Textbox4_36109056.Text) & ")", conect)
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\databarang.accdb") Dim NURHIDAYAH As New DataTable
Private Sub SIMPAN_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SIMPAN.Click Dim NUNU As New OleDb.OleDbDataAdapter("select count(*) as coba from barang where kodebarang ='" & t136109034.Text & "'", CONECT) NURHIDAYAH.Rows.Clear() NUNU.Fill(NURHIDAYAH) If NURHIDAYAH.Rows(0).Item("coba") > 0 Then MsgBox("kode barang sudah ada") Else YAYA() End If Data()
Dim com As New OleDb.OleDbCommand com = New OleDb.OleDbCommand("insert into BARANG (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & t136109034.Text & "','" & t236109034.Text & "'," & Val(t336109034.Text) & "," & Val(t436109034.Text) & ")", CONECT)
Public Sub data() If Val(t136109034.Text) = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If If t236109034.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If
If Val(t336109034.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(t436109034.Text) = 0 Then MsgBox("jumlah barang belum diisi") Exit Sub End If End Sub End Class
Dim sambung As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\databarang.accdb") Dim pusat As New DataTable
Private Sub Button136109032_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109032.Click Dim cabang As New OleDb.OleDbDataAdapter("select count(*) as baru from barang where kodebarang ='" & T136109032.Text & "'", sambung) pusat.Rows.Clear() cabang.Fill(pusat) If pusat.Rows(0).Item("baru") > 0 Then MsgBox("kode yang anda masukkan sudah ada") Else mirasthi() End If esthi() T136109032.Text = "" T236109032.Text = "" T336109032.Text = "" T436109032.Text = ""
End Sub
Public Sub mirasthi() Dim com As New OleDb.OleDbCommand com = New OleDb.OleDbCommand("insert into BARANG (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & T136109032.Text & "','" & T236109032.Text & "'," & Val(T336109032.Text) & "," & Val(T436109032.Text) & ")", sambung)
Public Sub esthi() If Val(T136109032.Text) = 0 Then MsgBox("kode barang anda belum dimasukkan") Exit Sub End If If T236109032.Text.Length = 0 Then MsgBox("nama barang anda belum dimasukkan") Exit Sub End If
If Val(T336109032.Text) = 0 Then MsgBox("harga jual anda belum dimasukkan") Exit Sub End If
If Val(T436109032.Text) = 0 Then MsgBox("jumlah barang anda belum dimasukkan") Exit Sub
Dim CONECT As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=tahir") Dim browse As New DataTable
Private Sub Button136109033_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109033.Click Dim tiwi As New OleDb.OleDbDataAdapter("select count(*) as coba from barang where kodebarang ='" & t136109033.Text & "'", CONECT) browse.Rows.Clear() tiwi.Fill(browse) If browse.Rows(0).Item("coba") > 0 Then MsgBox("kode barang sudah ada") Else pratiwi() End If Data()
Dim com As New OleDb.OleDbCommand com = New OleDb.OleDbCommand("insert into BARANG (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & t136109033.Text & "','" & t236109033.Text & "'," & Val(t336109033.Text) & "," & Val(t436109033.Text) & ")", CONECT)
Public Sub data() If Val(t136109033.Text) = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If If t236109033.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If
If Val(t336109033.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(t436109033.Text) = 0 Then MsgBox("jumlah barang belum diisi") Exit Sub End If End Sub End Class
Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=4433221100") Dim cari As New ByIskandar.CariKeDataBaseByIskandar
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 'untuk mencari jgn sampai data yg akan dimasukkan tidak lengkap If Val(t136109047.Text) = 0 Then 'untuk pencarian yg bersifat angka MsgBox("kode barang belum terisi") Exit Sub 'jgn lanjut ke proses berikutnya End If
If t236109047.Text.Length = 0 Then ' untuk pencarian yg bersifat huruf MsgBox("nama barang belum terisi") Exit Sub End If
If Val(t336109047.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(t436109047.Text) = 0 Then MsgBox("jumlah barang belum diisi") Exit Sub End If
'untuk mencari jgn sampai data yg akan dimasukkan sudah ada cari.AturPencarianDataBase("BARANG", "KODEBARANG", t136109047.Text, 1, conect)
If cari.JumlanBaris > 0 Then MsgBox("kode sudah ada") Exit Sub End If
'untuk memasukkan data dari visual basc ke dlm acces Dim com As New OleDb.OleDbCommand com = New OleDb.OleDbCommand("insert into BARANG (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & t136109047.Text & "','" & t236109047.Text & "'," & Val(t336109047.Text) & "," & Val(t436109047.Text) & ")", conect)
Dim sambung As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=jayapura") Dim pusat As New DataTable
Private Sub Button136109032_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109032.Click Dim cabang As New OleDb.OleDbDataAdapter("select count(*) as baru from barang where kodebarang ='" & T136109032.Text & "'", sambung) pusat.Rows.Clear() cabang.Fill(pusat) If pusat.Rows(0).Item("baru") > 0 Then MsgBox("kode yang anda masukkan sudah ada") Else mirasthi() End If esthi() T136109032.Text = "" T236109032.Text = "" T336109032.Text = "" T436109032.Text = ""
End Sub
Public Sub mirasthi() Dim com As New OleDb.OleDbCommand com = New OleDb.OleDbCommand("insert into BARANG (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & T136109032.Text & "','" & T236109032.Text & "'," & Val(T336109032.Text) & "," & Val(T436109032.Text) & ")", sambung)
Public Sub esthi() If Val(T136109032.Text) = 0 Then MsgBox("kode barang anda belum dimasukkan") Exit Sub End If If T236109032.Text.Length = 0 Then MsgBox("nama barang anda belum dimasukkan") Exit Sub End If
If Val(T336109032.Text) = 0 Then MsgBox("harga jual anda belum dimasukkan") Exit Sub End If
If Val(T436109032.Text) = 0 Then MsgBox("jumlah barang anda belum dimasukkan") Exit Sub
Public Class LATIHAN027_36109037 'dekklarasi connection Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=2901911691") Dim cari As New ByIskandar.CariKeDataBaseByIskandar
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 'untuk mencari jgn sampai data yg akan dimasukkan tidak lengkap If Val(t136109037.Text) = 0 Then 'untuk pencarian yg bersifat angka MsgBox("kode barang belum terisi") Exit Sub 'jgn lanjut ke proses berikutnya End If
If t236109037.Text.Length = 0 Then ' untuk pencarian yg bersifat huruf MsgBox("nama barang belum terisi") Exit Sub End If
If Val(t336109037.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(t436109037.Text) = 0 Then MsgBox("jumlah barang belum diisi") Exit Sub End If
'untuk mencari jgn sampai data yg akan dimasukkan sudah ada cari.AturPencarianDataBase("BARANG", "KODEBARANG", t136109037.Text, 1, conect)
If cari.JumlanBaris > 0 Then MsgBox("kode sudah ada") Exit Sub End If
'untuk memasukkan data dari visual basc ke dlm acces Dim com As New OleDb.OleDbCommand com = New OleDb.OleDbCommand("insert into BARANG (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & t136109037.Text & "','" & t236109037.Text & "'," & Val(t336109037.Text) & "," & Val(t436109037.Text) & ")", conect)
Public Class Latih27_36109034 'dekklarasi connection Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;jet OLEDB:database password=nhunoe") Dim cari As New ByIskandar.CariKeDataBaseByIskandar
Private Sub SIMPAN_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SIMPAN.Click 'untuk mencari jgn sampai data yg akan dimasukkan tidak lengkap If Val(t136109034.Text) = 0 Then 'untuk pencarian yg bersifat angka MsgBox("kode barang belum terisi") Exit Sub 'jgn lanjut ke proses berikutnya End If
If t236109034.Text.Length = 0 Then ' untuk pencarian yg bersifat huruf MsgBox("nama barang belum terisi") Exit Sub End If
If Val(t336109034.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(t436109034.Text) = 0 Then MsgBox("jumlah barang belum diisi") Exit Sub End If
'untuk mencari jgn sampai data yg akan dimasukkan sudah ada cari.AturPencarianDataBase("BARANG", "KODEBARANG", t136109034.Text, 1, conect)
If cari.JumlanBaris > 0 Then MsgBox("kode sudah ada") Exit Sub End If
'untuk memasukkan data dari visual basc ke dlm acces Dim com As New OleDb.OleDbCommand com = New OleDb.OleDbCommand("insert into BARANG (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & t136109034.Text & "','" & t236109034.Text & "'," & Val(t336109034.Text) & "," & Val(t436109034.Text) & ")", conect)
Public Class Form2736108001 Dim INCE As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=36108001") Dim VENUS As New ByIskandar.CariKeDataBaseByIskandar Private Sub B36108001_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B36108001.Click If T136108001.Text.Length = 0 Then MsgBox("Isi Kode Barang") Exit Sub End If
If T236108001.Text.Length = 0 Then MsgBox("Isi Nama Barang") Exit Sub End If
If Val(T336108001.Text) = 0 Then MsgBox("Isi Harga Jual") Exit Sub End If
If Val(T436108001.Text) = 0 Then MsgBox("Isi Jumlah Barang") Exit Sub End If
VENUS.AturPencarianDataBase("barang", "kodebarang", T136108001.Text, 1, INCE) If VENUS.JumlanBaris > 0 Then MsgBox("Kode Tersebut Sudah Ada") Exit Sub End If
Dim BLUE As New OleDb.OleDbCommand BLUE = New OleDb.OleDbCommand(" insert into barang (kodebarang, namabarang, hargajual,jumlahbarang) " & _ "values ('" & T136108001.Text & "', '" & T236108001.Text & "', " & Val(T336108001.Text) & "," & Val(T436108001.Text) & ") ", INCE) INCE.Open() BLUE.ExecuteNonQuery() INCE.Close()
Public Class Latihan27_035
BalasHapusDim go As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =D:\materi kuliah II\semester 5\VB\LATIHAN 27-34 SIMPAN EDIT DELETE DATA\DATABARANG.accdb")
Dim isi As New ByIskandar.CariKeDataBaseByIskandar
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1035.Click
'perintah periksa data
If t1035.Text.Length = 0 Then
MsgBox("Please Insert Your Text")
Exit Sub
End If
If t2035.Text.Length = 0 Then
MsgBox("Please Insert Your Text")
Exit Sub
End If
If Val(t3035.Text) = 0 Then
MsgBox("Please Insert Your Text")
Exit Sub
End If
If Val(t4035.Text) = 0 Then
MsgBox("Please Insert Your Text")
Exit Sub
End If
'perintah ambil data
'Dim aku As New OleDb.OleDbCommand("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =C:\users\andihabibi\My Documents\latihan 15-26 mengakses data on 10.0.7.1\DataTransaksiJualBeli.accdb")
isi.AturPencarianDataBase("BARANG", "KODEBARANG", t1035.Text, 1, go)
If isi.JumlanBaris > 0 Then
MsgBox("The data has been exist please insert new data")
'mengosongkan text box
t1035.Text = ""
t2035.Text = ""
t3035.Text = ""
t4035.Text = ""
Exit Sub
End If
'deklarasi object command
Dim Cm As New OleDb.OleDbCommand
Cm = New OleDb.OleDbCommand("INSERT INTO BARANG (KODEBARANG, NAMABARANG, HARGAJUAL, JUMLAHBARANG) VALUES ('" & t1035.Text & "','" & t2035.Text & "', " & Val(t3035.Text) & "," & Val(t4035.Text) & ")", go)
go.Open()
Cm.ExecuteNonQuery()
go.Close()
Cm.Dispose()
'mengosongkan text box
t1035.Text = ""
t2035.Text = ""
t3035.Text = ""
t4035.Text = ""
End Sub
End Class
Public Class LATIHAN02736109055
BalasHapusDim connect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=H:\berbagi\sharing2\LATIHAN 27-34 SIMPAN EDIT DELETE DATA\DATABARANG.accdb")
Dim cari As New ByIskandar.CariKeDataBaseByIskandar
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If textbox136109055.Text.Length = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If textbox236109055.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(textbox336109055.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(textbox436109055.Text) = 0 Then
MsgBox("jumlah barang belum diisi")
Exit Sub
End If
cari.AturPencarianDataBase("DATABARANG", "KODEBARANG", textbox136109055.Text, 1, connect)
If cari.JumlanBaris > 0 Then
MsgBox("kode sudah ada")
Exit Sub
End If
Dim com As New OleDb.OleDbCommand
com = New OleDb.OleDbCommand("insert into BARANG (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & textbox136109055.Text & "','" & textbox236109055.Text & "'," & Val(textbox336109055.Text) & "," & Val(textbox436109055.Text) & ")", connect)
conect.Open()
com.ExecuteNonQuery()
conect.Close()
com.Dispose()
textbox136109055.Text = ""
textbox236109055.Text = ""
textbox336109055.Text = ""
textbox436109055.Text = ""
End Sub
End Class
Public Class Latihan2736109046
BalasHapusDim connect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=D:\Qulyah\SEM 5\APKOM 4:\berbagi\sharing2\LATIHAN 27-34 SIMPAN EDIT DELETE DATA\ByIskandar.accdb")
Dim cari As New ByIskandar.CariKeDataBaseByIskandar
Private Sub Button136109046_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109046.Click
If t136109046.Text.Length = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If t236109046.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(t336109046.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(t436109046.Text) = 0 Then
MsgBox("jumlah barang belum diisi")
Exit Sub
End If
cari.AturPencarianDataBase("DATABARANG", "KODEBARANG", t136109046.Text, 1, connect)
If cari.JumlanBaris > 0 Then
MsgBox("kode sudah ada")
Exit Sub
End If
Dim com As New OleDb.OleDbCommand
com = New OleDb.OleDbCommand("insert into BARANG (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & t136109046.Text & "','" & t236109046.Text & "'," & Val(t336109046.Text) & "," & Val(t436109046.Text) & ")", connect)
connect.Open()
com.ExecuteNonQuery()
connect.Close()
com.Dispose()
t136109046.Text = ""
t236109046.Text = ""
t336109046.Text = ""
t436109046.Text = ""
End Sub
End Class
Public Class LATIHAN02736109033
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\databarang.accdb")
Dim browse As New DataTable
Private Sub Button136109033_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109033.Click
Dim tiwi As New OleDb.OleDbDataAdapter("select count(*) as coba from barang where kodebarang ='" & t136109033.Text & "'", CONECT)
browse.Rows.Clear()
tiwi.Fill(browse)
If browse.Rows(0).Item("coba") > 0 Then
MsgBox("kode barang sudah ada")
Else
pratiwi()
End If
Data()
t136109033.Text = ""
t236109033.Text = ""
t336109033.Text = ""
t436109033.Text = ""
End Sub
Public Sub pratiwi()
Dim com As New OleDb.OleDbCommand
com = New OleDb.OleDbCommand("insert into BARANG (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & t136109033.Text & "','" & t236109033.Text & "'," & Val(t336109033.Text) & "," & Val(t436109033.Text) & ")", CONECT)
CONECT.Open()
com.ExecuteNonQuery()
CONECT.Close()
com.Dispose()
End Sub
Public Sub data()
If Val(t136109033.Text) = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If t236109033.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(t336109033.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(t436109033.Text) = 0 Then
MsgBox("jumlah barang belum diisi")
Exit Sub
End If
End Sub
End Class
Public Class LATIHAN_027_36109056
BalasHapusDim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb")
Dim cari As New ByIskandar.CariKeDataBaseByIskandar
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Val(Textbox1_36109056.Text) = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If Textbox2_36109056.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(Textbox3_36109056.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(Textbox4_36109056.Text) = 0 Then
MsgBox("jumlah barang belum diisi")
Exit Sub
End If
cari.AturPencarianDataBase("BARANG", "KODEBARANG", Textbox1_36109056.Text, 1, conect)
If cari.JumlanBaris > 0 Then
MsgBox("kode sudah ada")
Exit Sub
End If
Dim com As New OleDb.OleDbCommand
com = New OleDb.OleDbCommand("insert into BARANG (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & Textbox1_36109056.Text & "','" & Textbox2_36109056.Text & "'," & Val(Textbox3_36109056.Text) & "," & Val(Textbox4_36109056.Text) & ")", conect)
conect.Open()
com.ExecuteNonQuery()
conect.Close()
com.Dispose()
Textbox1_36109056.Text = ""
Textbox2_36109056.Text = ""
Textbox3_36109056.Text = ""
Textbox4_36109056.Text = ""
End Sub
End Class
Public Class Latih27_36109034
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\databarang.accdb")
Dim NURHIDAYAH As New DataTable
Private Sub SIMPAN_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SIMPAN.Click
Dim NUNU As New OleDb.OleDbDataAdapter("select count(*) as coba from barang where kodebarang ='" & t136109034.Text & "'", CONECT)
NURHIDAYAH.Rows.Clear()
NUNU.Fill(NURHIDAYAH)
If NURHIDAYAH.Rows(0).Item("coba") > 0 Then
MsgBox("kode barang sudah ada")
Else
YAYA()
End If
Data()
t136109034.Text = ""
t236109034.Text = ""
t336109034.Text = ""
t436109034.Text = ""
End Sub
Public Sub YAYA()
Dim com As New OleDb.OleDbCommand
com = New OleDb.OleDbCommand("insert into BARANG (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & t136109034.Text & "','" & t236109034.Text & "'," & Val(t336109034.Text) & "," & Val(t436109034.Text) & ")", CONECT)
CONECT.Open()
com.ExecuteNonQuery()
CONECT.Close()
com.Dispose()
End Sub
Public Sub data()
If Val(t136109034.Text) = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If t236109034.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(t336109034.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(t436109034.Text) = 0 Then
MsgBox("jumlah barang belum diisi")
Exit Sub
End If
End Sub
End Class
Public Class LATIHAN02736109032
BalasHapusDim sambung As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\databarang.accdb")
Dim pusat As New DataTable
Private Sub Button136109032_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109032.Click
Dim cabang As New OleDb.OleDbDataAdapter("select count(*) as baru from barang where kodebarang ='" & T136109032.Text & "'", sambung)
pusat.Rows.Clear()
cabang.Fill(pusat)
If pusat.Rows(0).Item("baru") > 0 Then
MsgBox("kode yang anda masukkan sudah ada")
Else
mirasthi()
End If
esthi()
T136109032.Text = ""
T236109032.Text = ""
T336109032.Text = ""
T436109032.Text = ""
End Sub
Public Sub mirasthi()
Dim com As New OleDb.OleDbCommand
com = New OleDb.OleDbCommand("insert into BARANG (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & T136109032.Text & "','" & T236109032.Text & "'," & Val(T336109032.Text) & "," & Val(T436109032.Text) & ")", sambung)
sambung.Open()
com.ExecuteNonQuery()
sambung.Close()
com.Dispose()
End Sub
Public Sub esthi()
If Val(T136109032.Text) = 0 Then
MsgBox("kode barang anda belum dimasukkan")
Exit Sub
End If
If T236109032.Text.Length = 0 Then
MsgBox("nama barang anda belum dimasukkan")
Exit Sub
End If
If Val(T336109032.Text) = 0 Then
MsgBox("harga jual anda belum dimasukkan")
Exit Sub
End If
If Val(T436109032.Text) = 0 Then
MsgBox("jumlah barang anda belum dimasukkan")
Exit Sub
End If
End Sub
End Class
Komentar ini telah dihapus oleh pengarang.
BalasHapusrevisi :)
BalasHapusPublic Class LATIHAN02736109033
Dim CONECT As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=tahir")
Dim browse As New DataTable
Private Sub Button136109033_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109033.Click
Dim tiwi As New OleDb.OleDbDataAdapter("select count(*) as coba from barang where kodebarang ='" & t136109033.Text & "'", CONECT)
browse.Rows.Clear()
tiwi.Fill(browse)
If browse.Rows(0).Item("coba") > 0 Then
MsgBox("kode barang sudah ada")
Else
pratiwi()
End If
Data()
t136109033.Text = ""
t236109033.Text = ""
t336109033.Text = ""
t436109033.Text = ""
End Sub
Public Sub pratiwi()
Dim com As New OleDb.OleDbCommand
com = New OleDb.OleDbCommand("insert into BARANG (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & t136109033.Text & "','" & t236109033.Text & "'," & Val(t336109033.Text) & "," & Val(t436109033.Text) & ")", CONECT)
CONECT.Open()
com.ExecuteNonQuery()
CONECT.Close()
com.Dispose()
End Sub
Public Sub data()
If Val(t136109033.Text) = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If t236109033.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(t336109033.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(t436109033.Text) = 0 Then
MsgBox("jumlah barang belum diisi")
Exit Sub
End If
End Sub
End Class
Public Class LATIHAN02736109047
BalasHapusDim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=4433221100")
Dim cari As New ByIskandar.CariKeDataBaseByIskandar
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'untuk mencari jgn sampai data yg akan dimasukkan tidak lengkap
If Val(t136109047.Text) = 0 Then 'untuk pencarian yg bersifat angka
MsgBox("kode barang belum terisi")
Exit Sub 'jgn lanjut ke proses berikutnya
End If
If t236109047.Text.Length = 0 Then ' untuk pencarian yg bersifat huruf
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(t336109047.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(t436109047.Text) = 0 Then
MsgBox("jumlah barang belum diisi")
Exit Sub
End If
'untuk mencari jgn sampai data yg akan dimasukkan sudah ada
cari.AturPencarianDataBase("BARANG", "KODEBARANG", t136109047.Text, 1, conect)
If cari.JumlanBaris > 0 Then
MsgBox("kode sudah ada")
Exit Sub
End If
'untuk memasukkan data dari visual basc ke dlm acces
Dim com As New OleDb.OleDbCommand
com = New OleDb.OleDbCommand("insert into BARANG (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & t136109047.Text & "','" & t236109047.Text & "'," & Val(t336109047.Text) & "," & Val(t436109047.Text) & ")", conect)
conect.Open()
com.ExecuteNonQuery()
conect.Close()
com.Dispose()
t136109047.Text = ""
t236109047.Text = ""
t336109047.Text = ""
t436109047.Text = ""
End Sub
End Class
REVISI:
BalasHapusPublic Class LATIHAN02736109032
Dim sambung As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=jayapura")
Dim pusat As New DataTable
Private Sub Button136109032_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109032.Click
Dim cabang As New OleDb.OleDbDataAdapter("select count(*) as baru from barang where kodebarang ='" & T136109032.Text & "'", sambung)
pusat.Rows.Clear()
cabang.Fill(pusat)
If pusat.Rows(0).Item("baru") > 0 Then
MsgBox("kode yang anda masukkan sudah ada")
Else
mirasthi()
End If
esthi()
T136109032.Text = ""
T236109032.Text = ""
T336109032.Text = ""
T436109032.Text = ""
End Sub
Public Sub mirasthi()
Dim com As New OleDb.OleDbCommand
com = New OleDb.OleDbCommand("insert into BARANG (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & T136109032.Text & "','" & T236109032.Text & "'," & Val(T336109032.Text) & "," & Val(T436109032.Text) & ")", sambung)
sambung.Open()
com.ExecuteNonQuery()
sambung.Close()
com.Dispose()
End Sub
Public Sub esthi()
If Val(T136109032.Text) = 0 Then
MsgBox("kode barang anda belum dimasukkan")
Exit Sub
End If
If T236109032.Text.Length = 0 Then
MsgBox("nama barang anda belum dimasukkan")
Exit Sub
End If
If Val(T336109032.Text) = 0 Then
MsgBox("harga jual anda belum dimasukkan")
Exit Sub
End If
If Val(T436109032.Text) = 0 Then
MsgBox("jumlah barang anda belum dimasukkan")
Exit Sub
End If
End Sub
End Class
Public Class LATIHAN027_36109037
BalasHapus'dekklarasi connection
Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=2901911691")
Dim cari As New ByIskandar.CariKeDataBaseByIskandar
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'untuk mencari jgn sampai data yg akan dimasukkan tidak lengkap
If Val(t136109037.Text) = 0 Then 'untuk pencarian yg bersifat angka
MsgBox("kode barang belum terisi")
Exit Sub 'jgn lanjut ke proses berikutnya
End If
If t236109037.Text.Length = 0 Then ' untuk pencarian yg bersifat huruf
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(t336109037.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(t436109037.Text) = 0 Then
MsgBox("jumlah barang belum diisi")
Exit Sub
End If
'untuk mencari jgn sampai data yg akan dimasukkan sudah ada
cari.AturPencarianDataBase("BARANG", "KODEBARANG", t136109037.Text, 1, conect)
If cari.JumlanBaris > 0 Then
MsgBox("kode sudah ada")
Exit Sub
End If
'untuk memasukkan data dari visual basc ke dlm acces
Dim com As New OleDb.OleDbCommand
com = New OleDb.OleDbCommand("insert into BARANG (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & t136109037.Text & "','" & t236109037.Text & "'," & Val(t336109037.Text) & "," & Val(t436109037.Text) & ")", conect)
conect.Open()
com.ExecuteNonQuery()
conect.Close()
com.Dispose()
t136109037.Text = ""
t236109037.Text = ""
t336109037.Text = ""
t436109037.Text = ""
End Sub
End Class
REVISI WITH PASSWORD
BalasHapusPublic Class Latih27_36109034
'dekklarasi connection
Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;jet OLEDB:database password=nhunoe")
Dim cari As New ByIskandar.CariKeDataBaseByIskandar
Private Sub SIMPAN_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SIMPAN.Click
'untuk mencari jgn sampai data yg akan dimasukkan tidak lengkap
If Val(t136109034.Text) = 0 Then 'untuk pencarian yg bersifat angka
MsgBox("kode barang belum terisi")
Exit Sub 'jgn lanjut ke proses berikutnya
End If
If t236109034.Text.Length = 0 Then ' untuk pencarian yg bersifat huruf
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(t336109034.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(t436109034.Text) = 0 Then
MsgBox("jumlah barang belum diisi")
Exit Sub
End If
'untuk mencari jgn sampai data yg akan dimasukkan sudah ada
cari.AturPencarianDataBase("BARANG", "KODEBARANG", t136109034.Text, 1, conect)
If cari.JumlanBaris > 0 Then
MsgBox("kode sudah ada")
Exit Sub
End If
'untuk memasukkan data dari visual basc ke dlm acces
Dim com As New OleDb.OleDbCommand
com = New OleDb.OleDbCommand("insert into BARANG (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & t136109034.Text & "','" & t236109034.Text & "'," & Val(t336109034.Text) & "," & Val(t436109034.Text) & ")", conect)
conect.Open()
com.ExecuteNonQuery()
conect.Close()
com.Dispose()
t136109034.Text = ""
t236109034.Text = ""
t336109034.Text = ""
t436109034.Text = ""
End Sub
End Class
Public Class Form2736108001
BalasHapusDim INCE As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=36108001")
Dim VENUS As New ByIskandar.CariKeDataBaseByIskandar
Private Sub B36108001_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B36108001.Click
If T136108001.Text.Length = 0 Then
MsgBox("Isi Kode Barang")
Exit Sub
End If
If T236108001.Text.Length = 0 Then
MsgBox("Isi Nama Barang")
Exit Sub
End If
If Val(T336108001.Text) = 0 Then
MsgBox("Isi Harga Jual")
Exit Sub
End If
If Val(T436108001.Text) = 0 Then
MsgBox("Isi Jumlah Barang")
Exit Sub
End If
VENUS.AturPencarianDataBase("barang", "kodebarang", T136108001.Text, 1, INCE)
If VENUS.JumlanBaris > 0 Then
MsgBox("Kode Tersebut Sudah Ada")
Exit Sub
End If
Dim BLUE As New OleDb.OleDbCommand
BLUE = New OleDb.OleDbCommand(" insert into barang (kodebarang, namabarang, hargajual,jumlahbarang) " & _
"values ('" & T136108001.Text & "', '" & T236108001.Text & "', " & Val(T336108001.Text) & "," & Val(T436108001.Text) & ") ", INCE)
INCE.Open()
BLUE.ExecuteNonQuery()
INCE.Close()
T136108001.Text = ""
T236108001.Text = ""
T336108001.Text = ""
T436108001.Text = ""
End Sub
End Class
http://hilariusmariotonapa.blogspot.com/2012/10/prosedur-penyelesaian-latihan2736110048.html
BalasHapushttp://hilariusmariotonapa.blogspot.com/2012/10/deskripsi-latihan2736110048.html
http://www.masnurselayar.blogspot.com/2012/10/latihan-2736110055.html
BalasHapushttp://nurrahmahrasyid2.blogspot.com/2012/10/latihan2736110042.html
BalasHapushttp://nurhanalott.blogspot.com/2012/10/latihan2736110029.html
BalasHapushttp://03melisa.blogspot.com/2012/10/latihan-27-apkom-4-d3b-akuntansi-pnup.html
BalasHapushttp://ias-anakbola.blogspot.com/2012/10/latihan2736110056.html
BalasHapushttp://benhilll.blogspot.com/2012/10/deskripsi-dan-prosedur-latihan2736110039.html
BalasHapushttp://sukadriady.blogspot.com/2012/10/latihan.html
BalasHapushttp://ilhaazzahra.blogspot.com/2012/10/latihan2736110033.html
BalasHapushttp://andiniwarakusuma.blogspot.com/2012/10/latihan2736110034.html
BalasHapushttp://rizka-azisah.blogspot.com/2012/10/deskripsi-penyelesaian-latihan273611004.html
BalasHapushttp://rahmisuryatama05.blogspot.com/2012/10/latihan2736110040.html
BalasHapushttp://audryasharii.blogspot.com/2012/10/latihan2736110031.html
BalasHapushttp://rosyanausman.blogspot.com/2012/10/latihan2736110036.html
BalasHapushttp://tiya-sri.blogspot.com/2012/10/latihan2736110044-aplikasi-komputer-4.html
BalasHapushttp://rainaagrippinaa.blogspot.com/2012/10/latihan2736110032.html
BalasHapushttp://sriayu-36110030.blogspot.com/2012/10/diskripsi-dan-prosedur-latihan-27.html
BalasHapushttp://dewiwahyuni91.blogspot.com/2012/10/latihan2736110038.html
BalasHapushttp://eminaomi.blogspot.com/2012/10/latihan2736110049.html
BalasHapushttp://reskypurwono.blogspot.com/2012/10/prosedur-penyelesaian-latihan2736110037.html
BalasHapushttp://burhankhang58.blogspot.com/2012/10/latihan2736110047.html
BalasHapushttp://ruslancullank1.blogspot.com/2012/10/deskripsilatihan2736110054.html
BalasHapushttp://hasfiahzain.blogspot.com/2012/10/latihan2736110052.html
BalasHapushttp://zulkiflitryputra.blogspot.com/2012/10/latihan2736110046.html
BalasHapus