Public Class LATIHAN_029_46109054 Dim MULYADI As New OleDb.OleDbCommand Dim MUSTIKA As New ByIskandar.CariKeDataBaseByIskandar Dim CHAERUNNISA As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang. Databarang.ACCDB")
Private Sub Dwi1_46109054_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Dwi1_46109054.Click If ww2_46109054.Text.Length = 0 Then MsgBox("Isi rong itu yang kosong") Exit Sub End If
If ww3_46109054.Text.Length = 0 Then MsgBox("Isi rong itu yang kosong") Exit Sub End If
If Val(ww4_46109054.Text) = 0 Then MsgBox("Isi rong itu yang kosong") Exit Sub End If
If Val(ww5_46109054.Text) = 0 Then MsgBox("Isi rong itu yang kosong") Exit Sub End If
If ww1_46109054.Text <> ww2_46109054.Text Then
MUSTIKA.AturPencarianDataBase("Barang", "KodeBarang", ww2_46109054.Text, 1, CHAERUNNISA) If MUSTIKA.JumlanBaris > 0 Then MsgBox("Adami kode barang seperti itu") Exit Sub End If End If
Public Class LATIHAN_029_46109045 Dim dewi As New OleDb.OleDbCommand Dim dede As New ByIskandar.CariKeDataBaseByIskandar Dim chiko As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang. Databarang.ACCDB")
Private Sub dewi1_46109045_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dewi1_46109045.Click If ikha2_46109045.Text.Length = 0 Then MsgBox("Isi rong itu yang kosong") Exit Sub End If
If ikha3_46109045.Text.Length = 0 Then MsgBox("Isi rong itu yang kosong") Exit Sub End If
If Val(ikha4_46109045.Text) = 0 Then MsgBox("Isi rong itu yang kosong") Exit Sub End If
If Val(ikha5_46109045.Text) = 0 Then MsgBox("Isi rong itu yang kosong") Exit Sub End If
If ikha1_46109045.Text <> ikha2_46109045.Text Then
dede.AturPencarianDataBase("Barang", "KodeBarang", ikha2_46109045.Text, 1, chiko) If dede.JumlanBaris > 0 Then MsgBox("Adami kode barang seperti itu") Exit Sub End If End If
dewi = New OleDb.OleDbCommand("update barang set kodebarang = '" & ikha2_46109045.Text & "', namabarang = '" & ikha3_46109045.Text & "', hargajual = " & Val(ikha4_46109045.Text) & ", jumlahbarang = " & Val(ikha5_46109045.Text) & " where kodebarang = '" & ikha5_46109045.Text & "'", chiko) chiko.Open() dewi.ExecuteNonQuery() chiko.Close() dewi.Dispose()
ikha1_46109045.Text = "" ikha2_46109045.Text = "" ikha3_46109045.Text = "" ikha4_46109045.Text = "" ikha5_46109045.Text = "" End Sub End Class
Public Class Latihan29_46109001 Dim dwitya As New OleDb.OleDbCommand Dim saadah As New ByIskandar.CariKeDataBaseByIskandar Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\databarang.accdb")
Private Sub S46109001_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles S46109001.Click If KB46109001.Text.Length = 0 Then MsgBox("Isi yang kosong") Exit Sub End If
If NB46109001.Text.Length = 0 Then MsgBox("Isi yang kosong") Exit Sub End If
If Val(HJ46109001.Text) = 0 Then MsgBox("Isi yang kosong") Exit Sub End If
If Val(JB46109001.Text) = 0 Then MsgBox("Isi yang kosong") Exit Sub End If
If Kod46109001.Text <> KB46109001.Text Then
saadah.AturPencarianDataBase("Barang", "KodeBarang", KB46109001.Text, 1, conect) If saadah.JumlanBaris > 0 Then MsgBox("kode barang telah ada ") Exit Sub End If End If
Public Class LATIHAN029_46109008 Dim go As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;jet OLEDB:database password=46109008") Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1_46109008.Click If KB_46109008.Text.Length = 0 Then MsgBox("please insert your text") Exit Sub End If If KB1_46109008.Text.Length = 0 Then MsgBox("please insert your text") Exit Sub End If If NB_46109008.Text.Length = 0 Then MsgBox("please insert your text") Exit Sub End If If Val(HJ_46109008.Text) = 0 Then MsgBox("please insert your text") Exit Sub End If If Val(JB_46109008.Text) = 0 Then MsgBox("please insert your text") Exit Sub End If
Dim PENCARI As New ByIskandar.CariKeDataBaseByIskandar PENCARI.AturPencarianDataBase("BARANG", "KODEBARANG", KB1_46109008.Text, 1, go) If PENCARI.JumlanBaris > 0 Then MsgBox("the data has been exist please insert new data") KB_46109008.Text = "" NB_46109008.Text = "" HJ_46109008.Text = "" JB_46109008.Text = "" Exit Sub End If
Dim Cmd As New OleDb.OleDbCommand Cmd = New OleDb.OleDbCommand("update BARANG set KODEBARANG ='" & KB1_46109008.Text & "' , NAMABARANG = '" & NB_46109008.Text & "' , HARGAJUAL=" & Val(HJ_46109008.Text) & ", JUMLAHBARANG =" & Val(JB_46109008.Text) & " where KODEBARANG ='" & KB_46109008.Text & "'", go) go.Open() Cmd.ExecuteNonQuery() go.Close() Cmd.Dispose() KB_46109008.Text = "" KB1_46109008.Text = "" NB_46109008.Text = "" HJ_46109008.Text = "" JB_46109008.Text = "" End Sub
Private Sub Latihan29_46109008_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Public Class Form29 Dim DILA As New OleDb.OleDbCommand Dim FADILLAH As New ByIskandar.CariKeDataBaseByIskandar Dim SAGENA As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang. Databarang.ACCDB")
Private Sub DILA1_46109059_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DILA1_46109059.Click If DILA2_46109059.Text.Length = 0 Then MsgBox("Isi yang kosong") Exit Sub End If
If DILA3_46109059.Text.Length = 0 Then MsgBox("Isi yang kosong") Exit Sub End If
If Val(DILA4_46109059.Text) = 0 Then MsgBox("Isi yang kosong") Exit Sub End If
If Val(DILA5_46109059.Text) = 0 Then MsgBox("Isi yang kosong") Exit Sub End If
If DILA1_46109059.Text <> DILA2_46109059.Text Then
FADILLAH.AturPencarianDataBase("Barang", "KodeBarang", DILA2_46109059.Text, 1, SAGENA) If FADILLAH.JumlanBaris > 0 Then MsgBox("Ada kode barang seperti itu") Exit Sub End If End If
Public Class Latihan29_46109023 Dim ismi As New OleDb.OleDbCommand Dim sri As New ByIskandar.CariKeDataBaseByIskandar Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\databarang.accdb")
Private Sub S46109023_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles S46109023.Click If KB46109023.Text.Length = 0 Then MsgBox("Isi yang kosong") Exit Sub End If
If NB46109023.Text.Length = 0 Then MsgBox("Isi yang kosong") Exit Sub End If
If Val(HJ46109023.Text) = 0 Then MsgBox("Isi yang kosong") Exit Sub End If
If Val(JB46109023.Text) = 0 Then MsgBox("Isi yang kosong") Exit Sub End If
If Kod46109023.Text <> KB46109023.Text Then
saadah.AturPencarianDataBase("Barang", "KodeBarang", KB46109023.Text, 1, conect) If sri.JumlanBaris > 0 Then MsgBox("kode barang telah ada ") Exit Sub End If End If
ismi = New OleDb.OleDbCommand("update barang set kodebarang = '" & KB46109023.Text & "', namabarang = '" & NB46109023.Text & "', hargajual = " & Val(HJ46109023.Text) & ", jumlahbarang = " & Val(JB46109023.Text) & " where kodebarang = '" & Kod46109023.Text & "'", conect) conect.Open() ismi.ExecuteNonQuery() conect.Close() ismi.Dispose()
Kod46109023.Text = "" KB46109023.Text = "" NB46109023.Text = "" HJ46109023.Text = "" JB46109023.Text = "" End Sub End Class
Public Class LATIHAN_029_46109053 Dim SAENONG As New OleDb.OleDbCommand Dim INDAH As New ByIskandar.CariKeDataBaseByIskandar Dim YANI As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang. Databarang.ACCDB")
Private Sub Saenong1_46109053_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Saenong1_46109053.Click If sae2_46109053.Text.Length = 0 Then MsgBox("Isi rong itu yang kosong") Exit Sub End If
If sae3_46109053.Text.Length = 0 Then MsgBox("Isi rong itu yang kosong") Exit Sub End If
If Val(sae4_46109053.Text) = 0 Then MsgBox("Isi rong itu yang kosong") Exit Sub End If
If Val(sae5_46109053.Text) = 0 Then MsgBox("Isi rong itu yang kosong") Exit Sub End If
If sae1_46109053.Text <> sae2_46109053.Text Then
INDAH.AturPencarianDataBase("Barang", "KodeBarang", sae2_46109053.Text, 1, YANI) If INDAH.JumlanBaris > 0 Then MsgBox("Adami kode barang seperti itu") Exit Sub End If End If
Public Class LATIHAN02946109017 Dim CONECT As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=putri") Dim cari As New ByIskandar.CariKeDataBaseByIskandar Private Sub Button146109017_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button146109017.Click
If Val(t146109017.Text) = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If
If t246109017.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If
If Val(t346109017.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(t446109017.Text) = 0 Then MsgBox("jumlah barang belum diisi") Exit Sub End If
Public Class LATIHAN029_46109027 Dim BHEKU As New OleDb.OleDbCommand Dim FEBIANA As New ByIskandar.CariKeDataBaseByIskandar Dim ANA As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang. Databarang.ACCDB")
Private Sub Fransiskus1_46109027_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Fransiskus1_46109027.Click If feby2_46109027.Text.Length = 0 Then MsgBox("Isi rong itu yang kosong") Exit Sub End If
If feby3_46109027.Text.Length = 0 Then MsgBox("Isi rong itu yang kosong") Exit Sub End If
If Val(feby4_46109027.Text) = 0 Then MsgBox("Isi rong itu yang kosong") Exit Sub End If
If Val(feby5_46109027.Text) = 0 Then MsgBox("Isi rong itu yang kosong") Exit Sub End If
If feby1_46109027.Text <> feby2_46109027.Text Then
FEBIANA.AturPencarianDataBase("Barang", "KodeBarang", feby2_46109027.Text, 1, ANA) If FEBIANA.JumlanBaris > 0 Then MsgBox("Adami kode barang seperti itu") Exit Sub End If End If
LATIHAN29_46109051 Public Class LATIHAN29_46109051 Dim go As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;jet OLEDB:database password=WAHDANIAH")
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If kb46109051.Text.Length = 0 Then MsgBox("please insert your text") Exit Sub End If If TB146109051.Text.Length = 0 Then MsgBox("please insert your text") Exit Sub End If If TB246109051.Text.Length = 0 Then MsgBox("please insert your text") Exit Sub End If If Val(TB346109051.Text) = 0 Then MsgBox("please insert your text") Exit Sub End If If Val(TB446109051.Text) = 0 Then MsgBox("please insert your text") Exit Sub End If Dim PENCARI As New ByIskandar.CariKeDataBaseByIskandar PENCARI.AturPencarianDataBase("BARANG","KODEBARANG", TB146109051.Text, 1, go) If PENCARI.JumlanBaris > 0 Then MsgBox("the data has been exist please insert new data") kb46109051.Text = "" TB246109051.Text = "" TB346109051.Text = "" TB446109051.Text = "" Exit Sub End If
Dim Cm As New OleDb.OleDbCommand Cm = New OleDb.OleDbCommand("update BARANG set KODEBARANG ='" & TB146109051.Text & "' , NAMABARANG = '" & TB246109051.Text & "' , HARGAJUAL=" & Val(TB346109051.Text) & ", JUMLAHBARANG =" & Val(TB446109051.Text) & " where KODEBARANG ='" & kb46109051.Text & "'", go) go.Open() Cm.ExecuteNonQuery() go.Close() Cm.Dispose() kb46109051.Text = "" TB146109051.Text = "" TB246109051.Text = "" TB346109051.Text = "" TB446109051.Text = "" End Sub End Class
Public Class LATIHAN_029_46109054
BalasHapusDim MULYADI As New OleDb.OleDbCommand
Dim MUSTIKA As New ByIskandar.CariKeDataBaseByIskandar
Dim CHAERUNNISA As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang. Databarang.ACCDB")
Private Sub Dwi1_46109054_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Dwi1_46109054.Click
If ww2_46109054.Text.Length = 0 Then
MsgBox("Isi rong itu yang kosong")
Exit Sub
End If
If ww3_46109054.Text.Length = 0 Then
MsgBox("Isi rong itu yang kosong")
Exit Sub
End If
If Val(ww4_46109054.Text) = 0 Then
MsgBox("Isi rong itu yang kosong")
Exit Sub
End If
If Val(ww5_46109054.Text) = 0 Then
MsgBox("Isi rong itu yang kosong")
Exit Sub
End If
If ww1_46109054.Text <> ww2_46109054.Text Then
MUSTIKA.AturPencarianDataBase("Barang", "KodeBarang", ww2_46109054.Text, 1, CHAERUNNISA)
If MUSTIKA.JumlanBaris > 0 Then
MsgBox("Adami kode barang seperti itu")
Exit Sub
End If
End If
MULYADI = New OleDb.OleDbCommand("update barang set kodebarang = '" & ww2_46109054.Text & "', namabarang = '" & ww3_46109054.Text & "', hargajual = " & Val(ww4_46109054.Text) & ", jumlahbarang = " & Val(ww5_46109054.Text) & " where kodebarang = '" & ww1_46109054.Text & "'", CHAERUNNISA)
CHAERUNNISA.Open()
MULYADI.ExecuteNonQuery()
CHAERUNNISA.Close()
MULYADI.Dispose()
ww1_46109054.Text = ""
ww2_46109054.Text = ""
ww3_46109054.Text = ""
ww4_46109054.Text = ""
ww5_46109054.Text = ""
End Sub
End Class
dewi sartika
BalasHapus461 09 045
3a.d4
Public Class LATIHAN_029_46109045
Dim dewi As New OleDb.OleDbCommand
Dim dede As New ByIskandar.CariKeDataBaseByIskandar
Dim chiko As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang. Databarang.ACCDB")
Private Sub dewi1_46109045_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dewi1_46109045.Click
If ikha2_46109045.Text.Length = 0 Then
MsgBox("Isi rong itu yang kosong")
Exit Sub
End If
If ikha3_46109045.Text.Length = 0 Then
MsgBox("Isi rong itu yang kosong")
Exit Sub
End If
If Val(ikha4_46109045.Text) = 0 Then
MsgBox("Isi rong itu yang kosong")
Exit Sub
End If
If Val(ikha5_46109045.Text) = 0 Then
MsgBox("Isi rong itu yang kosong")
Exit Sub
End If
If ikha1_46109045.Text <> ikha2_46109045.Text Then
dede.AturPencarianDataBase("Barang", "KodeBarang", ikha2_46109045.Text, 1, chiko)
If dede.JumlanBaris > 0 Then
MsgBox("Adami kode barang seperti itu")
Exit Sub
End If
End If
dewi = New OleDb.OleDbCommand("update barang set kodebarang = '" & ikha2_46109045.Text & "', namabarang = '" & ikha3_46109045.Text & "', hargajual = " & Val(ikha4_46109045.Text) & ", jumlahbarang = " & Val(ikha5_46109045.Text) & " where kodebarang = '" & ikha5_46109045.Text & "'", chiko)
chiko.Open()
dewi.ExecuteNonQuery()
chiko.Close()
dewi.Dispose()
ikha1_46109045.Text = ""
ikha2_46109045.Text = ""
ikha3_46109045.Text = ""
ikha4_46109045.Text = ""
ikha5_46109045.Text = ""
End Sub
End Class
Public Class Latihan29_46109001
BalasHapusDim dwitya As New OleDb.OleDbCommand
Dim saadah As New ByIskandar.CariKeDataBaseByIskandar
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\databarang.accdb")
Private Sub S46109001_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles S46109001.Click
If KB46109001.Text.Length = 0 Then
MsgBox("Isi yang kosong")
Exit Sub
End If
If NB46109001.Text.Length = 0 Then
MsgBox("Isi yang kosong")
Exit Sub
End If
If Val(HJ46109001.Text) = 0 Then
MsgBox("Isi yang kosong")
Exit Sub
End If
If Val(JB46109001.Text) = 0 Then
MsgBox("Isi yang kosong")
Exit Sub
End If
If Kod46109001.Text <> KB46109001.Text Then
saadah.AturPencarianDataBase("Barang", "KodeBarang", KB46109001.Text, 1, conect)
If saadah.JumlanBaris > 0 Then
MsgBox("kode barang telah ada ")
Exit Sub
End If
End If
dwitya = New OleDb.OleDbCommand("update barang set kodebarang = '" & KB46109001.Text & "', namabarang = '" & NB46109001.Text & "', hargajual = " & Val(HJ46109001.Text) & ", jumlahbarang = " & Val(JB46109001.Text) & " where kodebarang = '" & Kod46109001.Text & "'", conect)
conect.Open()
dwitya.ExecuteNonQuery()
conect.Close()
dwitya.Dispose()
Kod46109001.Text = ""
KB46109001.Text = ""
NB46109001.Text = ""
HJ46109001.Text = ""
JB46109001.Text = ""
End Sub
End Class
Public Class LATIHAN029_46109008
BalasHapusDim go As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;jet OLEDB:database password=46109008")
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1_46109008.Click
If KB_46109008.Text.Length = 0 Then
MsgBox("please insert your text")
Exit Sub
End If
If KB1_46109008.Text.Length = 0 Then
MsgBox("please insert your text")
Exit Sub
End If
If NB_46109008.Text.Length = 0 Then
MsgBox("please insert your text")
Exit Sub
End If
If Val(HJ_46109008.Text) = 0 Then
MsgBox("please insert your text")
Exit Sub
End If
If Val(JB_46109008.Text) = 0 Then
MsgBox("please insert your text")
Exit Sub
End If
Dim PENCARI As New ByIskandar.CariKeDataBaseByIskandar
PENCARI.AturPencarianDataBase("BARANG", "KODEBARANG", KB1_46109008.Text, 1, go)
If PENCARI.JumlanBaris > 0 Then
MsgBox("the data has been exist please insert new data")
KB_46109008.Text = ""
NB_46109008.Text = ""
HJ_46109008.Text = ""
JB_46109008.Text = ""
Exit Sub
End If
Dim Cmd As New OleDb.OleDbCommand
Cmd = New OleDb.OleDbCommand("update BARANG set KODEBARANG ='" & KB1_46109008.Text & "' , NAMABARANG = '" & NB_46109008.Text & "' , HARGAJUAL=" & Val(HJ_46109008.Text) & ", JUMLAHBARANG =" & Val(JB_46109008.Text) & " where KODEBARANG ='" & KB_46109008.Text & "'", go)
go.Open()
Cmd.ExecuteNonQuery()
go.Close()
Cmd.Dispose()
KB_46109008.Text = ""
KB1_46109008.Text = ""
NB_46109008.Text = ""
HJ_46109008.Text = ""
JB_46109008.Text = ""
End Sub
Private Sub Latihan29_46109008_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Public Class Form29
BalasHapusDim DILA As New OleDb.OleDbCommand
Dim FADILLAH As New ByIskandar.CariKeDataBaseByIskandar
Dim SAGENA As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang. Databarang.ACCDB")
Private Sub DILA1_46109059_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DILA1_46109059.Click
If DILA2_46109059.Text.Length = 0 Then
MsgBox("Isi yang kosong")
Exit Sub
End If
If DILA3_46109059.Text.Length = 0 Then
MsgBox("Isi yang kosong")
Exit Sub
End If
If Val(DILA4_46109059.Text) = 0 Then
MsgBox("Isi yang kosong")
Exit Sub
End If
If Val(DILA5_46109059.Text) = 0 Then
MsgBox("Isi yang kosong")
Exit Sub
End If
If DILA1_46109059.Text <> DILA2_46109059.Text Then
FADILLAH.AturPencarianDataBase("Barang", "KodeBarang", DILA2_46109059.Text, 1, SAGENA)
If FADILLAH.JumlanBaris > 0 Then
MsgBox("Ada kode barang seperti itu")
Exit Sub
End If
End If
DILA = New OleDb.OleDbCommand("update barang set kodebarang = '" & DILA2_46109059.Text & "', namabarang = '" & DILA3_46109059.Text & "', hargajual = " & Val(DILA4_46109059.Text) & ", jumlahbarang = " & Val(DILA5_46109059.Text) & " where kodebarang = '" & DILA1_46109059.Text & "'", SAGENA)
SAGENA.Open()
DILA.ExecuteNonQuery()
SAGENA.Close()
DILANONG.Dispose()
DILA1_46109059.Text = ""
DILA2_46109059.Text = ""
DILA3_46109059.Text = ""
DILA4_46109059.Text = ""
DILA5_46109059.Text = ""
End Sub
End Class
Public Class Latihan29_46109023
BalasHapusDim ismi As New OleDb.OleDbCommand
Dim sri As New ByIskandar.CariKeDataBaseByIskandar
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\databarang.accdb")
Private Sub S46109023_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles S46109023.Click
If KB46109023.Text.Length = 0 Then
MsgBox("Isi yang kosong")
Exit Sub
End If
If NB46109023.Text.Length = 0 Then
MsgBox("Isi yang kosong")
Exit Sub
End If
If Val(HJ46109023.Text) = 0 Then
MsgBox("Isi yang kosong")
Exit Sub
End If
If Val(JB46109023.Text) = 0 Then
MsgBox("Isi yang kosong")
Exit Sub
End If
If Kod46109023.Text <> KB46109023.Text Then
saadah.AturPencarianDataBase("Barang", "KodeBarang", KB46109023.Text, 1, conect)
If sri.JumlanBaris > 0 Then
MsgBox("kode barang telah ada ")
Exit Sub
End If
End If
ismi = New OleDb.OleDbCommand("update barang set kodebarang = '" & KB46109023.Text & "', namabarang = '" & NB46109023.Text & "', hargajual = " & Val(HJ46109023.Text) & ", jumlahbarang = " & Val(JB46109023.Text) & " where kodebarang = '" & Kod46109023.Text & "'", conect)
conect.Open()
ismi.ExecuteNonQuery()
conect.Close()
ismi.Dispose()
Kod46109023.Text = ""
KB46109023.Text = ""
NB46109023.Text = ""
HJ46109023.Text = ""
JB46109023.Text = ""
End Sub
End Class
Public Class LATIHAN_029_46109053
BalasHapusDim SAENONG As New OleDb.OleDbCommand
Dim INDAH As New ByIskandar.CariKeDataBaseByIskandar
Dim YANI As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang. Databarang.ACCDB")
Private Sub Saenong1_46109053_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Saenong1_46109053.Click
If sae2_46109053.Text.Length = 0 Then
MsgBox("Isi rong itu yang kosong")
Exit Sub
End If
If sae3_46109053.Text.Length = 0 Then
MsgBox("Isi rong itu yang kosong")
Exit Sub
End If
If Val(sae4_46109053.Text) = 0 Then
MsgBox("Isi rong itu yang kosong")
Exit Sub
End If
If Val(sae5_46109053.Text) = 0 Then
MsgBox("Isi rong itu yang kosong")
Exit Sub
End If
If sae1_46109053.Text <> sae2_46109053.Text Then
INDAH.AturPencarianDataBase("Barang", "KodeBarang", sae2_46109053.Text, 1, YANI)
If INDAH.JumlanBaris > 0 Then
MsgBox("Adami kode barang seperti itu")
Exit Sub
End If
End If
SAENONG = New OleDb.OleDbCommand("update barang set kodebarang = '" & sae2_46109053.Text & "', namabarang = '" & sae3_46109053.Text & "', hargajual = " & Val(sae4_46109053.Text) & ", jumlahbarang = " & Val(sae5_46109053.Text) & " where kodebarang = '" & sae1_46109053.Text & "'", YANI)
YANI.Open()
SAENONG.ExecuteNonQuery()
YANI.Close()
SAENONG.Dispose()
sae1_46109053.Text = ""
sae2_46109053.Text = ""
sae3_46109053.Text = ""
sae4_46109053.Text = ""
sae5_46109053.Text = ""
End Sub
End Class
Public Class LATIHAN02946109017
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=putri")
Dim cari As New ByIskandar.CariKeDataBaseByIskandar
Private Sub Button146109017_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button146109017.Click
If Val(t146109017.Text) = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If t246109017.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(t346109017.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(t446109017.Text) = 0 Then
MsgBox("jumlah barang belum diisi")
Exit Sub
End If
cari.AturPencarianDataBase("BARANG", "KODEBARANG", kb46109017.Text, 1, CONECT)
If cari.JumlanBaris = False Then
MsgBox("kode tidak ada")
Exit Sub
End If
Dim com As New OleDb.OleDbCommand
com = New OleDb.OleDbCommand("UPDATE BARANG SET kodebarang = '" & t146109017.Text & "', namabarang = '" & t246109017.Text & "', hargajual = " & Val(t346109017.Text) & ", jumlahbarang = " & Val(t446109017.Text) & " where kodebarang ='" & kb46109017.Text & "'", CONECT)
CONECT.Open()
com.ExecuteNonQuery()
CONECT.Close()
com.Dispose()
kb46109017.Text = ""
t146109017.Text = ""
t246109017.Text = ""
t346109017.Text = ""
t446109017.Text = ""
End Sub
End Class
Nama :febiana fransiskus
BalasHapusstmbk :46109027
Public Class LATIHAN029_46109027
Dim BHEKU As New OleDb.OleDbCommand
Dim FEBIANA As New ByIskandar.CariKeDataBaseByIskandar
Dim ANA As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang. Databarang.ACCDB")
Private Sub Fransiskus1_46109027_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Fransiskus1_46109027.Click
If feby2_46109027.Text.Length = 0 Then
MsgBox("Isi rong itu yang kosong")
Exit Sub
End If
If feby3_46109027.Text.Length = 0 Then
MsgBox("Isi rong itu yang kosong")
Exit Sub
End If
If Val(feby4_46109027.Text) = 0 Then
MsgBox("Isi rong itu yang kosong")
Exit Sub
End If
If Val(feby5_46109027.Text) = 0 Then
MsgBox("Isi rong itu yang kosong")
Exit Sub
End If
If feby1_46109027.Text <> feby2_46109027.Text Then
FEBIANA.AturPencarianDataBase("Barang", "KodeBarang", feby2_46109027.Text, 1, ANA)
If FEBIANA.JumlanBaris > 0 Then
MsgBox("Adami kode barang seperti itu")
Exit Sub
End If
End If
BHEKU = New OleDb.OleDbCommand("update barang set kodebarang = '" & feby2_46109027.Text & "', namabarang = '" & feby3_46109027.Text & "', hargajual = " & Val(feby4_46109027.Text) & ", jumlahbarang = " & Val(feby5_46109027.Text) & " where kodebarang = '" & feby1_46109027.Text & "'", ANA)
ANA.Open()
BHEKU.ExecuteNonQuery()
ANA.Close()
BHEKU.Dispose()
feby1_46109027.Text = ""
feby2_46109027.Text = ""
feby3_46109027.Text = ""
feby4_46109027.Text = ""
feby5_46109027.Text = ""
End Sub
End Class
Tugas Ahmad Syukri Ardiansya(46109040)
BalasHapushttp://tugas46109040.blogspot.com/2011/11/latihan-29apkom.html
WAHDANIAH
BalasHapus46109051
LATIHAN29_46109051
Public Class LATIHAN29_46109051
Dim go As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;jet OLEDB:database password=WAHDANIAH")
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If kb46109051.Text.Length = 0 Then
MsgBox("please insert your text")
Exit Sub
End If
If TB146109051.Text.Length = 0 Then
MsgBox("please insert your text")
Exit Sub
End If
If TB246109051.Text.Length = 0 Then
MsgBox("please insert your text")
Exit Sub
End If
If Val(TB346109051.Text) = 0 Then
MsgBox("please insert your text")
Exit Sub
End If
If Val(TB446109051.Text) = 0 Then
MsgBox("please insert your text")
Exit Sub
End If
Dim PENCARI As New ByIskandar.CariKeDataBaseByIskandar
PENCARI.AturPencarianDataBase("BARANG","KODEBARANG", TB146109051.Text, 1, go)
If PENCARI.JumlanBaris > 0 Then
MsgBox("the data has been exist please insert new data")
kb46109051.Text = ""
TB246109051.Text = ""
TB346109051.Text = ""
TB446109051.Text = ""
Exit Sub
End If
Dim Cm As New OleDb.OleDbCommand
Cm = New OleDb.OleDbCommand("update BARANG set KODEBARANG ='" & TB146109051.Text & "' , NAMABARANG = '" & TB246109051.Text & "' , HARGAJUAL=" & Val(TB346109051.Text) & ", JUMLAHBARANG =" & Val(TB446109051.Text) & " where KODEBARANG ='" & kb46109051.Text & "'", go)
go.Open()
Cm.ExecuteNonQuery()
go.Close()
Cm.Dispose()
kb46109051.Text = ""
TB146109051.Text = ""
TB246109051.Text = ""
TB346109051.Text = ""
TB446109051.Text = ""
End Sub
End Class
http://wahyunirachman.blogspot.com/2012/10/latihan2946110020.html
BalasHapushttp://ildayani.blogspot.com/2012/10/latihan2946110002.html
BalasHapushttp://dianmegariski.blogspot.com/2012/10/latihan2946110023_13.html
BalasHapushttp://diyanahdina.blogspot.com/2012/10/latihan2946110045.html
BalasHapushttp://srikartikafanty.blogspot.com/2012/10/latihan2946110007.html
BalasHapushttp://alfaega.blogspot.com/2012/10/latihan2946110022.html
BalasHapushttp://hanihasan07.blogspot.com/2012/10/latihan2946110044.html
BalasHapushttp://idhamsyaam.blogspot.com/2012/10/latihan2946110021.html
BalasHapushttp://sulhihusni.blogspot.com/2012/10/latihan2946110004.html
BalasHapushttp://restyaccounting.blogspot.com/2012/10/latihan2946110027.html
BalasHapushttp://amalmaulana92.blogspot.com/2012/10/latihan2946110003.html
BalasHapushttp://mulyawarman039.blogspot.com/2012/10/latihan2946110039.html
BalasHapushttp://bothbon.blogspot.com/2012/10/latihan2946110043.html
BalasHapushttp://feibyfrycilia.blogspot.com/2012/10/latihan2946110055.html
BalasHapushttp://fitrianihamka.blogspot.com/2012/10/latihan2946110006.html
BalasHapushttp://bahrizj.blogspot.com/2012/10/latihan-2946110001.html
BalasHapushttp://muthmil8.blogspot.com/2012/10/latihan2946110037.html
BalasHapushttp://aardianzah2.blogspot.com/2012/10/latihan-29.html
BalasHapushttp://rafidashaleh.blogspot.com/2012/10/latihan2946110041.html
BalasHapushttp://cacalisa.blogspot.com/2012/10/latihan2946110038.html
BalasHapushttp://deodns.blogspot.com/2012/10/latihan2946110040.html
BalasHapushttp://yuliaasrida427.blogspot.com/2012/10/latihan2946110009.html
BalasHapushttp://masdarwati.blogspot.com/2012/10/latihan2946110024_14.html
BalasHapus