Public NotInheritable Class form32a_36109003 Dim anto As New DataTable Dim ndut As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DATABARANG.accdb'")
Private Sub tambah_36109003_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tambah_36109003.Click If form32b_36109003.Visible = False Then form32b_36109003.Show() Else form32b_36109003.Activate() End If End Sub
Private Sub form32a_36109003_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select * from barang", ndut) anto.Rows.Clear() adapter.Fill(anto) adapter.Dispose() dgv_36109003.DataSource = anto End Sub
Private Sub edit_36109003_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles edit_36109003.Click If form32c_36109003.Visible = False Then form32c_36109003.Show() Else form32c_36109003.Activate() End If form32c_36109003.kbl_36109003.Text = dgv_36109003.CurrentRow.Cells("kodebarang").Value form32c_36109003.kb_36109003.Text = dgv_36109003.CurrentRow.Cells("kodebarang").Value form32c_36109003.nb_36109003.Text = dgv_36109003.CurrentRow.Cells("namabarang").Value form32c_36109003.jb_36109003.Text = dgv_36109003.CurrentRow.Cells("jumlahbarang").Value form32c_36109003.hj_36109003.Text = dgv_36109003.CurrentRow.Cells("hargajual").Value End Sub End Class
Public NotInheritable Class form32b_36109003 Dim arman As New ByIskandar.CariKeDataBaseByIskandar Dim anto As New OleDb.OleDbCommand Dim ndut As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DATABARANG.accdb'")
Private Sub simpan_36109003_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles simpan_36109003.Click arman.AturPencarianDataBase("Barang", "KodeBarang", kb_36109003.Text, 1, ndut) If arman.JumlanBaris > 0 Then MsgBox("kode barang telah ada") kb_36109003.Text = "" Exit Sub ElseIf kb_36109003.Text.Length = 0 Then MsgBox("kode barang harus tercantum") Exit Sub ElseIf nb_36109003.Text.Length = 0 Then MsgBox("nama barang harus tercantum") Exit Sub ElseIf hj_36109003.Text.Length = 0 Then MsgBox("harga jual harus tercantum") Exit Sub ElseIf jb_36109003.Text.Length = 0 Then MsgBox("jumlah barang harus tercantum") Exit Sub End If Dim soe As String = "insert into barang (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & kb_36109003.Text & "','" & nb_36109003.Text & "'," & Val(hj_36109003.Text) & "," & Val(jb_36109003.Text) & ")" anto = New OleDb.OleDbCommand(soe, ndut) ndut.Open() anto.ExecuteNonQuery() ndut.Close() anto.Dispose() kb_36109003.Text = "" nb_36109003.Text = "" hj_36109003.Text = "" jb_36109003.Text = "" End Sub End Class
Public NotInheritable Class form32c_36109003 Dim arman As New ByIskandar.CariKeDataBaseByIskandar Dim anto As New OleDb.OleDbCommand Dim ndut As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DATABARANG.accdb'")
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If kbl_36109003.Text <> kb_36109003.Text Then arman.AturPencarianDataBase("Barang", "KodeBarang", kb_36109003.Text, 1, ndut) If arman.JumlanBaris > 0 Then MsgBox("kode barang tidak dapat diupdate") Exit Sub End If End If If kb_36109003.Text.Length = 0 Then MsgBox("kode barang harus tercantum") Exit Sub ElseIf nb_36109003.Text.Length = 0 Then MsgBox("nama barang harus tercantum") Exit Sub ElseIf hj_36109003.Text.Length = 0 Then MsgBox("harga jual harus tercantum") Exit Sub ElseIf jb_36109003.Text.Length = 0 Then MsgBox("jumlah barang harus tercantum") Exit Sub End If Dim soe As String = "update barang set kodebarang = '" & kb_36109003.Text & "', namabarang = '" & nb_36109003.Text & "', hargajual = " & Val(hj_36109003.Text) & ", jumlahbarang = " & Val(jb_36109003.Text) & " where kodebarang = '" & kbl_36109003.Text & "'" anto = New OleDb.OleDbCommand(soe, ndut) ndut.Open() anto.ExecuteNonQuery() ndut.Close() anto.Dispose() kbl_36109003.Text = "-" kb_36109003.Text = "" nb_36109003.Text = "" hj_36109003.Text = "" jb_36109003.Text = "" End Sub End Class
Latihan 32A Public Class Latihan32A_36109005 Dim DT As New DataTable Dim SS As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.ACCDB") Public Sub ISMI() Dim AD As New OleDb.OleDbDataAdapter AD = New OleDb.OleDbDataAdapter("select * from barang", SS) DT.Rows.Clear() AD.Fill(DT) AD.Dispose() End Sub Private Sub Latihan32A_36109005_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ISMI() DGV_36109005.DataSource = DT End Sub Private Sub T_36109005_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles T_36109005.Click If Latihan32B_36109005.Visible = False Then Latihan32B_36109005.Show() Else Latihan32B_36109005.Activate() End If
End Sub Private Sub E_36109005_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles E_36109005.Click If Latihan32C_36109005.Visible = False Then Latihan32C_36109005.Show() Else Latihan32C_36109005.Activate() End If
Latihan32C_36109005.Show() End Sub End Class Latihan 32B Public Class Latihan32B_36109005 Dim IMMY As New ByIskandar.CariKeDataBaseByIskandar Dim KALI As New OleDb.OleDbCommand Dim BAGI As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataBarang.ACCDB") Private Sub Simpan_36109005_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Simpan_36109005.Click If t1_36109005.Text.Length = 0 Then MsgBox("Masukkan teks") Exit Sub End If
If t2_36109005.Text.Length = 0 Then MsgBox("Masukkan teks") Exit Sub End If
If Val(t3_36109005.Text) = 0 Then MsgBox("Masukkan Teks") Exit Sub End If
If Val(t4_36109005.Text) = 0 Then MsgBox("Masukkan teks") Exit Sub End If
Dim PENCARI As New ByIskandar.CariKeDataBaseByIskandar PENCARI.AturPencarianDataBase("BARANG", "KODEBARANG", t1_36109005.Text, 1, BAGI)
If PENCARI.JumlanBaris > 0 Then MsgBox("Kode Barang Sudah Ada")
t1_36109005.Text = " " t2_36109005.Text = " " t3_36109005.Text = " " t4_36109005.Text = " " Exit Sub End If
Dim MI As New OleDb.OleDbCommand MI = New OleDb.OleDbCommand("INSERT INTO BARANG (KODEBARANG, NAMABARANG, HARGAJUAL, JUMLAHBARANG) VALUES ('" & t1_36109005.Text & "','" & t2_36109005.Text & "', " & Val(t3_36109005.Text) & "," & Val(t4_36109005.Text) & ")", BAGI) BAGI.Open() MI.ExecuteNonQuery() BAGI.Close() MI.Dispose()
t1_36109005.Text = " " t2_36109005.Text = " " t3_36109005.Text = " " t4_36109005.Text = " " End Sub End Class
Latihan 32C Public Class Latihan32C_36109005 Dim IM As New OleDb.OleDbCommand Dim ISMI As New ByIskandar.CariKeDataBaseByIskandar Dim MI As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.ACCDB") Private Sub Simpan_36109005_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Simpan_36109005.Click If t1_36109005.Text.Length = 0 Then MsgBox("Masukkan teks") Exit Sub End If
If t2_36109005.Text.Length = 0 Then MsgBox("Masukkan teks") Exit Sub End If
If Val(t3_36109005.Text) = 0 Then MsgBox("Masukkan teks") Exit Sub End If
If Val(t4_36109005.Text) = 0 Then MsgBox("Masukkan teks") Exit Sub End If
If kb_36109005.Text <> t1_36109005.Text Then
ISMI.AturPencarianDataBase("Barang", "KodeBarang", t1_36109005.Text, 1, MI) If ISMI.JumlanBaris > 0 Then MsgBox("Kode Barang Sudah Ada") Exit Sub End If End If
IM = New OleDb.OleDbCommand("update barang set kodebarang = '" & t1_36109005.Text & "', namabarang = '" & t2_36109005.Text & "', hargajual = " & Val(t3_36109005.Text) & ", jumlahbarang = " & Val(t4_36109005.Text) & " where kodebarang = '" & KB_36109005.Text & "'", MI) MI.Open() IM.ExecuteNonQuery() MI.Close() IM.Dispose()
Public Class Form32A Dim DIEGO As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\DATABARANG.ACCDB") Dim SHARAPOVA As New DataTable
Private Sub Form32A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load XXX() DGV014.DataSource = SHARAPOVA
End Sub Public Sub XXX() Dim ADAPTER As New OleDb.OleDbDataAdapter ADAPTER = New OleDb.OleDbDataAdapter("SELECT * FROM BARANG", DIEGO) SHARAPOVA.Rows.Clear()
ADAPTER.Fill(SHARAPOVA) ADAPTER.Dispose() End Sub Private Sub TAMBAH014_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TAMBAH014.Click If Form32B.Visible = False Then Form32B.Show() Else Form32B.Activate() End If End Sub
Private Sub EDIT014_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EDIT014.Click If Form32C.Visible = False Then Form32C.Show() Else Form32C.Activate() End If
Public Class Form32B Dim DIEGO As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\DATABARANG.ACCDB")
Private Sub SIMPAN014_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SIMPAN014.Click If KB014.Text.Length = 0 Then MsgBox("MASUKKAN KODE BARANG") Exit Sub End If
If NB014.Text.Length = 0 Then MsgBox("MASUKKAN NAMA BARANG") Exit Sub End If
If Val(HJ014.Text) = 0 Then MsgBox("MASUKKAN HARGA JUAL") Exit Sub End If
If Val(JB014.Text) = 0 Then MsgBox("MASUKKAN JUMLAH BARANG") Exit Sub End If
Dim XXX As New ByIskandar.CariKeDataBaseByIskandar XXX.AturPencarianDataBase("BARANG", "KODEBARANG", KB014.Text, 1, DIEGO) If XXX.JumlanBaris > 0 Then MsgBox(" KODE BARANG SUDAH ADA") Exit Sub End If
Dim ABC As New OleDb.OleDbCommand ABC = New OleDb.OleDbCommand("INSERT INTO BARANG(KODEBARANG,NAMABARANG,HARGAJUAL,JUMLAHBARANG) VALUES('" & KB014.Text & "','" & NB014.Text & "'," & Val(HJ014) & "," & Val(JB014.Text) & ")", DIEGO)
Form32A.XXX() End Sub End Class Public Class Form32C Dim DIEGO As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\DATABARANG.ACCDB")
Private Sub SIMPAN014_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SIMPAN014.Click If KB014.Text.Length = 0 Then MsgBox("MASUKKAN KODE BARANG") Exit Sub End If
If NB014.Text.Length = 0 Then MsgBox("MASUKKAN NAMA BARANG") Exit Sub End If
If Val(HJ014.Text) = 0 Then MsgBox("MASUKKAN HARGA JUAL") Exit Sub End If
If Val(JB014.Text) = 0 Then MsgBox("MASUKKAN JUMLAH BARANG") Exit Sub End If
If KBL014.Text <> KB014.Text Then Dim XXX As New ByIskandar.CariKeDataBaseByIskandar XXX.AturPencarianDataBase("BARANG", "KODEBARANG", KB014.Text, 1, DIEGO) If XXX.JumlanBaris > 0 Then MsgBox(" KODE BARANG SUDAH ADA") Exit Sub End If End If
Dim ABC As New OleDb.OleDbCommand ABC = New OleDb.OleDbCommand("UPDATE BARANG SET KODEBARANG = '" & KB014.Text & "', NAMABARANG = '" & NB014.Text & "', HARGAJUAL = " & Val(HJ014.Text) & ", JUMLAHBARANG = " & Val(JB014.Text) & " WHERE KODEBARANG = '" & KBL014.Text & "'", DIEGO)
Public Class Form32A_36109001 Dim rr As New DataTable Dim imps As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.ACCDB")
Public Sub apreal() Dim apr As New OleDb.OleDbDataAdapter apr = New OleDb.OleDbDataAdapter("select * from barang", imps) rr.Rows.Clear() apr.Fill(rr) apr.Dispose() End Sub
Private Sub Form32A_36109001_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load apreal() dgv.DataSource = rr End Sub
Private Sub aa_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn1_36109001.Click If Form32B_36109001.Visible = False Then Form32B_36109001.Show() Else Form32B_36109001.Activate() End If End Sub
Private Sub bb_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn2_36109001.Click If Form32C_36109001.Visible = False Then Form32C_36109001.Show() Else Form32C_36109001.Activate() End If
FORM32-C Public Class Form32_C Dim uthi As New ByIskandar.CariKeDataBaseByIskandar Dim poltek As New OleDb.OleDbCommand Dim ak As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.ACCDB") Private Sub simpan36109016_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles simpan36109016.Click If kode36109016.Text.Length = 0 Then MsgBox("Isi rong itu yang kosong") Exit Sub End If
If nama36109016.Text.Length = 0 Then MsgBox("Isi rong itu yang kosong") Exit Sub End If
If Val(harga36109016.Text) = 0 Then MsgBox("Isi rong itu yang kosong") Exit Sub End If
If Val(jumlah36109016.Text) = 0 Then MsgBox("Isi rong itu yang kosong") Exit Sub End If
If kode36109016.Text <> KB36109016.Text Then uthi.AturPencarianDataBase("Barang", "KodeBarang", kode36109016.Text, 1, ak) If uthi.JumlanBaris > 0 Then MsgBox("Adami kode barang seperti itu") Exit Sub End If End If
Public Class Form32A_36109006 Dim rr As New DataTable Dim harun As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.ACCDB")
Public Sub muhharun() Dim mhh As New OleDb.OleDbDataAdapter mhh = New OleDb.OleDbDataAdapter("select * from barang", harun) rr.Rows.Clear() mhh.Fill(rr) mhh.Dispose() End Sub
Private Sub Form32A_36109006_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load muhharun() dgv_36109006.DataSource = rr End Sub
Private Sub tambah_36109006_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tambah_36109006.Click If Form32B_36109006.Visible = False Then Form32B_36109006.Show() Else Form32B_36109006.Activate() End If End Sub
Private Sub edit_36109006_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles edit_36109006.Click If Form32C_36109006.Visible = False Then Form32C_36109006.Show() Else Form32C_36109006.Activate() End If
Public Class Form32B_36109006 Dim harun As New ByIskandar.CariKeDataBaseByIskandar Dim cm As New OleDb.OleDbCommand Dim mhh As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.ACCDB")
Private Sub simpan_36109006_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles simpan_36109006.Click If txt1_36109006.Text.Length = 0 Then MsgBox("Isi rong itu yang kosong") Exit Sub End If
If txt2_36109006.Text.Length = 0 Then MsgBox("Isi yang kosong") Exit Sub End If
If Val(txt_36109006.Text) = 0 Then MsgBox("Isi yang kosong") Exit Sub End If
If Val(txt4_36109006.Text) = 0 Then MsgBox("Isi yang kosong") Exit Sub End If
harun.AturPencarianDataBase("Barang", "KodeBarang", txt1_36109006.Text, 1, mhh) If harun.JumlanBaris > 0 Then MsgBox("Kode barang sudah ada") Exit Sub End If
cm = New OleDb.OleDbCommand("insert into barang (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & txt1_36109006.Text & "','" & txt2_36109006.Text & "'," & Val(txt_36109006.Text) & "," & Val(txt4_36109006.Text) & ")", mhh) mhh.Open() cm.ExecuteNonQuery() mhh.Close() cm.Dispose()
Public Class Form32C_36109006 Dim harun As New ByIskandar.CariKeDataBaseByIskandar Dim rr As New OleDb.OleDbCommand Dim mhh As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.AHJ_36109006DB")
Private Sub simpan_36109006_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles simpan_36109006.Click If kb_36109006.Text.Length = 0 Then MsgBox("Isi yang kosong") Exit Sub End If
If nb_36109006.Text.Length = 0 Then MsgBox("Isi yang kosong") Exit Sub End If
If Val(hj_36109006.Text) = 0 Then MsgBox("Isi yang kosong") Exit Sub End If
If Val(jb_36109006.Text) = 0 Then MsgBox("Isi yang kosong") Exit Sub End If
If kb_36109006.Text <> ee_36109006.Text Then harun.AturPencarianDataBase("Barang", "KodeBarang", kb_36109006.Text, 1, mhh) If harun.JumlanBaris > 0 Then MsgBox("Adami kode barang seperti itu") Exit Sub End If End If
Public Class Form32B_36109001 Dim apreal As New ByIskandar.CariKeDataBaseByIskandar Dim cm As New OleDb.OleDbCommand Dim imps As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.ACCDB")
Private Sub ee_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn1_36109001.Click If txt1_36109001.Text.Length = 0 Then MsgBox("Silahkan isi yang kosong") Exit Sub End If
If txt2_36109001.Text.Length = 0 Then MsgBox("Silahkan isi yang kosong") Exit Sub End If
If Val(txt_36109001.Text) = 0 Then MsgBox("Silahkan isi yang kosong") Exit Sub End If
If Val(txt4_36109001.Text) = 0 Then MsgBox("Silahkan isi yang kosong") Exit Sub End If
apreal.AturPencarianDataBase("Barang", "KodeBarang", txt1_36109001.Text, 1, imps) If apreal.JumlanBaris > 0 Then MsgBox("Adami kode barang seperti itu") Exit Sub End If
cm = New OleDb.OleDbCommand("insert into barang (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & txt1_36109001.Text & "','" & txt2_36109001.Text & "'," & Val(txt_36109001.Text) & "," & Val(txt4_36109001.Text) & ")", imps) imps.Open() cm.ExecuteNonQuery() imps.Close() cm.Dispose()
Public Class Form32C_36109001 Dim apreal As New ByIskandar.CariKeDataBaseByIskandar Dim rr As New OleDb.OleDbCommand Dim imps As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.AHJ_36109001DB")
Private Sub btn_36109001_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_36109001.Click If kb_36109001.Text.Length = 0 Then MsgBox("Silahkan isi yang kosong") Exit Sub End If
If nb_36109001.Text.Length = 0 Then MsgBox("Silahkan isi yang kosong") Exit Sub End If
If Val(hj_36109001.Text) = 0 Then MsgBox("Silahkan isi yang kosong") Exit Sub End If
If Val(jb_36109001.Text) = 0 Then MsgBox("Silahkan isi yang kosong") Exit Sub End If
If kb_36109001.Text <> ee.Text Then apreal.AturPencarianDataBase("Barang", "KodeBarang", kb_36109001.Text, 1, imps) If apreal.JumlanBaris > 0 Then MsgBox("Adami kode barang seperti itu") Exit Sub End If End If
Public NotInheritable Class form32a_36109003
BalasHapusDim anto As New DataTable
Dim ndut As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DATABARANG.accdb'")
Private Sub tambah_36109003_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tambah_36109003.Click
If form32b_36109003.Visible = False Then
form32b_36109003.Show()
Else
form32b_36109003.Activate()
End If
End Sub
Private Sub form32a_36109003_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select * from barang", ndut)
anto.Rows.Clear()
adapter.Fill(anto)
adapter.Dispose()
dgv_36109003.DataSource = anto
End Sub
Private Sub edit_36109003_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles edit_36109003.Click
If form32c_36109003.Visible = False Then
form32c_36109003.Show()
Else
form32c_36109003.Activate()
End If
form32c_36109003.kbl_36109003.Text = dgv_36109003.CurrentRow.Cells("kodebarang").Value
form32c_36109003.kb_36109003.Text = dgv_36109003.CurrentRow.Cells("kodebarang").Value
form32c_36109003.nb_36109003.Text = dgv_36109003.CurrentRow.Cells("namabarang").Value
form32c_36109003.jb_36109003.Text = dgv_36109003.CurrentRow.Cells("jumlahbarang").Value
form32c_36109003.hj_36109003.Text = dgv_36109003.CurrentRow.Cells("hargajual").Value
End Sub
End Class
Public NotInheritable Class form32b_36109003
Dim arman As New ByIskandar.CariKeDataBaseByIskandar
Dim anto As New OleDb.OleDbCommand
Dim ndut As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DATABARANG.accdb'")
Private Sub simpan_36109003_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles simpan_36109003.Click
arman.AturPencarianDataBase("Barang", "KodeBarang", kb_36109003.Text, 1, ndut)
If arman.JumlanBaris > 0 Then
MsgBox("kode barang telah ada")
kb_36109003.Text = ""
Exit Sub
ElseIf kb_36109003.Text.Length = 0 Then
MsgBox("kode barang harus tercantum")
Exit Sub
ElseIf nb_36109003.Text.Length = 0 Then
MsgBox("nama barang harus tercantum")
Exit Sub
ElseIf hj_36109003.Text.Length = 0 Then
MsgBox("harga jual harus tercantum")
Exit Sub
ElseIf jb_36109003.Text.Length = 0 Then
MsgBox("jumlah barang harus tercantum")
Exit Sub
End If
Dim soe As String = "insert into barang (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & kb_36109003.Text & "','" & nb_36109003.Text & "'," & Val(hj_36109003.Text) & "," & Val(jb_36109003.Text) & ")"
anto = New OleDb.OleDbCommand(soe, ndut)
ndut.Open()
anto.ExecuteNonQuery()
ndut.Close()
anto.Dispose()
kb_36109003.Text = ""
nb_36109003.Text = ""
hj_36109003.Text = ""
jb_36109003.Text = ""
End Sub
End Class
Public NotInheritable Class form32c_36109003
BalasHapusDim arman As New ByIskandar.CariKeDataBaseByIskandar
Dim anto As New OleDb.OleDbCommand
Dim ndut As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DATABARANG.accdb'")
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If kbl_36109003.Text <> kb_36109003.Text Then
arman.AturPencarianDataBase("Barang", "KodeBarang", kb_36109003.Text, 1, ndut)
If arman.JumlanBaris > 0 Then
MsgBox("kode barang tidak dapat diupdate")
Exit Sub
End If
End If
If kb_36109003.Text.Length = 0 Then
MsgBox("kode barang harus tercantum")
Exit Sub
ElseIf nb_36109003.Text.Length = 0 Then
MsgBox("nama barang harus tercantum")
Exit Sub
ElseIf hj_36109003.Text.Length = 0 Then
MsgBox("harga jual harus tercantum")
Exit Sub
ElseIf jb_36109003.Text.Length = 0 Then
MsgBox("jumlah barang harus tercantum")
Exit Sub
End If
Dim soe As String = "update barang set kodebarang = '" & kb_36109003.Text & "', namabarang = '" & nb_36109003.Text & "', hargajual = " & Val(hj_36109003.Text) & ", jumlahbarang = " & Val(jb_36109003.Text) & " where kodebarang = '" & kbl_36109003.Text & "'"
anto = New OleDb.OleDbCommand(soe, ndut)
ndut.Open()
anto.ExecuteNonQuery()
ndut.Close()
anto.Dispose()
kbl_36109003.Text = "-"
kb_36109003.Text = ""
nb_36109003.Text = ""
hj_36109003.Text = ""
jb_36109003.Text = ""
End Sub
End Class
RUSNANINGSI R
BalasHapus36109010
http://rusnaningsi.blogspot.com/2011/11/latihan-31-33-apkom-4.html
amelia indahsari
BalasHapus361 09 023
http://heiamee.blogspot.com/2011/11/form-32.html
iftah urfiana
BalasHapus361 09 017
http://uphy-iftah.blogspot.com/search/label/apkom4
Ismi Febriani Ayikin
BalasHapus361 09 005
3a D3
Latihan 32A
Public Class Latihan32A_36109005
Dim DT As New DataTable
Dim SS As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.ACCDB")
Public Sub ISMI()
Dim AD As New OleDb.OleDbDataAdapter
AD = New OleDb.OleDbDataAdapter("select * from barang", SS)
DT.Rows.Clear()
AD.Fill(DT)
AD.Dispose()
End Sub
Private Sub Latihan32A_36109005_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ISMI()
DGV_36109005.DataSource = DT
End Sub
Private Sub T_36109005_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles T_36109005.Click
If Latihan32B_36109005.Visible = False Then
Latihan32B_36109005.Show()
Else
Latihan32B_36109005.Activate()
End If
End Sub
Private Sub E_36109005_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles E_36109005.Click
If Latihan32C_36109005.Visible = False Then
Latihan32C_36109005.Show()
Else
Latihan32C_36109005.Activate()
End If
Latihan32C_36109005.KB_36109005.Text = DGV_36109005.CurrentRow.Cells("kodebarang").Value
Latihan32C_36109005.t1_36109005.Text = DGV_36109005.CurrentRow.Cells("kodebarang").Value
Latihan32C_36109005.t2_36109005.Text = DGV_36109005.CurrentRow.Cells("namabarang").Value
Latihan32C_36109005.t3_36109005.Text = DGV_36109005.CurrentRow.Cells("hargajual").Value
Latihan32C_36109005.t4_36109005.Text = DGV_36109005.CurrentRow.Cells("jumlahbarang").Value
Latihan32C_36109005.Show()
End Sub
End Class
Latihan 32B
Public Class Latihan32B_36109005
Dim IMMY As New ByIskandar.CariKeDataBaseByIskandar
Dim KALI As New OleDb.OleDbCommand
Dim BAGI As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataBarang.ACCDB")
Private Sub Simpan_36109005_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Simpan_36109005.Click
If t1_36109005.Text.Length = 0 Then
MsgBox("Masukkan teks")
Exit Sub
End If
If t2_36109005.Text.Length = 0 Then
MsgBox("Masukkan teks")
Exit Sub
End If
If Val(t3_36109005.Text) = 0 Then
MsgBox("Masukkan Teks")
Exit Sub
End If
If Val(t4_36109005.Text) = 0 Then
MsgBox("Masukkan teks")
Exit Sub
End If
Dim PENCARI As New ByIskandar.CariKeDataBaseByIskandar
PENCARI.AturPencarianDataBase("BARANG", "KODEBARANG", t1_36109005.Text, 1, BAGI)
If PENCARI.JumlanBaris > 0 Then
MsgBox("Kode Barang Sudah Ada")
t1_36109005.Text = " "
t2_36109005.Text = " "
t3_36109005.Text = " "
t4_36109005.Text = " "
Exit Sub
End If
Dim MI As New OleDb.OleDbCommand
MI = New OleDb.OleDbCommand("INSERT INTO BARANG (KODEBARANG, NAMABARANG, HARGAJUAL, JUMLAHBARANG) VALUES ('" & t1_36109005.Text & "','" & t2_36109005.Text & "', " & Val(t3_36109005.Text) & "," & Val(t4_36109005.Text) & ")", BAGI)
BAGI.Open()
MI.ExecuteNonQuery()
BAGI.Close()
MI.Dispose()
t1_36109005.Text = " "
t2_36109005.Text = " "
t3_36109005.Text = " "
t4_36109005.Text = " "
End Sub
End Class
Ismi Febriani Ayikin
BalasHapus361 09 005
3a D3
Latihan 32C
Public Class Latihan32C_36109005
Dim IM As New OleDb.OleDbCommand
Dim ISMI As New ByIskandar.CariKeDataBaseByIskandar
Dim MI As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.ACCDB")
Private Sub Simpan_36109005_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Simpan_36109005.Click
If t1_36109005.Text.Length = 0 Then
MsgBox("Masukkan teks")
Exit Sub
End If
If t2_36109005.Text.Length = 0 Then
MsgBox("Masukkan teks")
Exit Sub
End If
If Val(t3_36109005.Text) = 0 Then
MsgBox("Masukkan teks")
Exit Sub
End If
If Val(t4_36109005.Text) = 0 Then
MsgBox("Masukkan teks")
Exit Sub
End If
If kb_36109005.Text <> t1_36109005.Text Then
ISMI.AturPencarianDataBase("Barang", "KodeBarang", t1_36109005.Text, 1, MI)
If ISMI.JumlanBaris > 0 Then
MsgBox("Kode Barang Sudah Ada")
Exit Sub
End If
End If
IM = New OleDb.OleDbCommand("update barang set kodebarang = '" & t1_36109005.Text & "', namabarang = '" & t2_36109005.Text & "', hargajual = " & Val(t3_36109005.Text) & ", jumlahbarang = " & Val(t4_36109005.Text) & " where kodebarang = '" & KB_36109005.Text & "'", MI)
MI.Open()
IM.ExecuteNonQuery()
MI.Close()
IM.Dispose()
KB_36109005.Text = ""
t1_36109005.Text = ""
t2_36109005.Text = ""
t3_36109005.Text = ""
t4_36109005.Text = ""
Latihan32A_36109005.ISMI()
End Sub
End Class
Public Class Form32A
BalasHapusDim DIEGO As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\DATABARANG.ACCDB")
Dim SHARAPOVA As New DataTable
Private Sub Form32A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
XXX()
DGV014.DataSource = SHARAPOVA
End Sub
Public Sub XXX()
Dim ADAPTER As New OleDb.OleDbDataAdapter
ADAPTER = New OleDb.OleDbDataAdapter("SELECT * FROM BARANG", DIEGO)
SHARAPOVA.Rows.Clear()
ADAPTER.Fill(SHARAPOVA)
ADAPTER.Dispose()
End Sub
Private Sub TAMBAH014_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TAMBAH014.Click
If Form32B.Visible = False Then
Form32B.Show()
Else
Form32B.Activate()
End If
End Sub
Private Sub EDIT014_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EDIT014.Click
If Form32C.Visible = False Then
Form32C.Show()
Else
Form32C.Activate()
End If
Form32C.KBL014.Text = DGV014.CurrentRow.Cells("KODEBARANG").Value
Form32C.KB014.Text = DGV014.CurrentRow.Cells("KODEBARANG").Value
Form32C.NB014.Text = DGV014.CurrentRow.Cells("NAMABARANG").Value
Form32C.HJ014.Text = DGV014.CurrentRow.Cells("HARGAJUAL").Value
Form32C.JB014.Text = DGV014.CurrentRow.Cells("JUMLAHBARANG").Value
End Sub
End Class
Public Class Form32B
BalasHapusDim DIEGO As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\DATABARANG.ACCDB")
Private Sub SIMPAN014_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SIMPAN014.Click
If KB014.Text.Length = 0 Then
MsgBox("MASUKKAN KODE BARANG")
Exit Sub
End If
If NB014.Text.Length = 0 Then
MsgBox("MASUKKAN NAMA BARANG")
Exit Sub
End If
If Val(HJ014.Text) = 0 Then
MsgBox("MASUKKAN HARGA JUAL")
Exit Sub
End If
If Val(JB014.Text) = 0 Then
MsgBox("MASUKKAN JUMLAH BARANG")
Exit Sub
End If
Dim XXX As New ByIskandar.CariKeDataBaseByIskandar
XXX.AturPencarianDataBase("BARANG", "KODEBARANG", KB014.Text, 1, DIEGO)
If XXX.JumlanBaris > 0 Then
MsgBox(" KODE BARANG SUDAH ADA")
Exit Sub
End If
Dim ABC As New OleDb.OleDbCommand
ABC = New OleDb.OleDbCommand("INSERT INTO BARANG(KODEBARANG,NAMABARANG,HARGAJUAL,JUMLAHBARANG) VALUES('" & KB014.Text & "','" & NB014.Text & "'," & Val(HJ014) & "," & Val(JB014.Text) & ")", DIEGO)
DIEGO.Open()
ABC.ExecuteNonQuery()
DIEGO.Close()
KB014.Text = ""
NB014.Text = ""
HJ014.Text = ""
JB014.Text = ""
Form32A.XXX()
End Sub
End Class
Public Class Form32C
Dim DIEGO As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\DATABARANG.ACCDB")
Private Sub SIMPAN014_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SIMPAN014.Click
If KB014.Text.Length = 0 Then
MsgBox("MASUKKAN KODE BARANG")
Exit Sub
End If
If NB014.Text.Length = 0 Then
MsgBox("MASUKKAN NAMA BARANG")
Exit Sub
End If
If Val(HJ014.Text) = 0 Then
MsgBox("MASUKKAN HARGA JUAL")
Exit Sub
End If
If Val(JB014.Text) = 0 Then
MsgBox("MASUKKAN JUMLAH BARANG")
Exit Sub
End If
If KBL014.Text <> KB014.Text Then
Dim XXX As New ByIskandar.CariKeDataBaseByIskandar
XXX.AturPencarianDataBase("BARANG", "KODEBARANG", KB014.Text, 1, DIEGO)
If XXX.JumlanBaris > 0 Then
MsgBox(" KODE BARANG SUDAH ADA")
Exit Sub
End If
End If
Dim ABC As New OleDb.OleDbCommand
ABC = New OleDb.OleDbCommand("UPDATE BARANG SET KODEBARANG = '" & KB014.Text & "', NAMABARANG = '" & NB014.Text & "', HARGAJUAL = " & Val(HJ014.Text) & ", JUMLAHBARANG = " & Val(JB014.Text) & " WHERE KODEBARANG = '" & KBL014.Text & "'", DIEGO)
DIEGO.Open()
ABC.ExecuteNonQuery()
DIEGO.Close()
ABC.Dispose()
KBL014.Text = "-"
KB014.Text = ""
NB014.Text = ""
HJ014.Text = ""
JB014.Text = ""
Form32A.XXX()
End Sub
End Class
http://aminurul.blogspot.com/2011/11/form-32a-34c.html
BalasHapusPublic Class Form32A_36109001
BalasHapusDim rr As New DataTable
Dim imps As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.ACCDB")
Public Sub apreal()
Dim apr As New OleDb.OleDbDataAdapter
apr = New OleDb.OleDbDataAdapter("select * from barang", imps)
rr.Rows.Clear()
apr.Fill(rr)
apr.Dispose()
End Sub
Private Sub Form32A_36109001_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
apreal()
dgv.DataSource = rr
End Sub
Private Sub aa_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn1_36109001.Click
If Form32B_36109001.Visible = False Then
Form32B_36109001.Show()
Else
Form32B_36109001.Activate()
End If
End Sub
Private Sub bb_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn2_36109001.Click
If Form32C_36109001.Visible = False Then
Form32C_36109001.Show()
Else
Form32C_36109001.Activate()
End If
Form32C_36109001.kb_36109001.Text = dgv.CurrentRow.Cells("kodebarang").Value
Form32C_36109001.nb_36109001.Text = dgv.CurrentRow.Cells("namabarang").Value
Form32C_36109001.hj_36109001.Text = dgv.CurrentRow.Cells("hargajual").Value
Form32C_36109001.jb_36109001.Text = dgv.CurrentRow.Cells("jumlahbarang").Value
Form32C_36109001.ee.Text = dgv.CurrentRow.Cells("kodebarang").Value
Form32C_36109001.Show()
End Sub
End Class
HASTUTI
BalasHapus36109016
FORM32-C
Public Class Form32_C
Dim uthi As New ByIskandar.CariKeDataBaseByIskandar
Dim poltek As New OleDb.OleDbCommand
Dim ak As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.ACCDB")
Private Sub simpan36109016_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles simpan36109016.Click
If kode36109016.Text.Length = 0 Then
MsgBox("Isi rong itu yang kosong")
Exit Sub
End If
If nama36109016.Text.Length = 0 Then
MsgBox("Isi rong itu yang kosong")
Exit Sub
End If
If Val(harga36109016.Text) = 0 Then
MsgBox("Isi rong itu yang kosong")
Exit Sub
End If
If Val(jumlah36109016.Text) = 0 Then
MsgBox("Isi rong itu yang kosong")
Exit Sub
End If
If kode36109016.Text <> KB36109016.Text Then
uthi.AturPencarianDataBase("Barang", "KodeBarang", kode36109016.Text, 1, ak)
If uthi.JumlanBaris > 0 Then
MsgBox("Adami kode barang seperti itu")
Exit Sub
End If
End If
poltek = New OleDb.OleDbCommand("update barang set kodebarang = '" & kode36109016.Text & "', namabarang = '" & nama36109016.Text & "', hargajual = " & Val(harga36109016.Text) & ", jumlahbarang = " & Val(jumlah36109016.Text) & " where kodebarang = '" & KB36109016.Text & "'", ak)
ak.Open()
poltek.ExecuteNonQuery()
ak.Close()
poltek.Dispose()
kode36109016.Text = ""
nama36109016.Text = ""
harga36109016.Text = ""
jumlah36109016.Text = ""
KB36109016.Text = ""
Form32_A.uthi()
End Sub
End Class
Public Class Form32A_36109006
BalasHapusDim rr As New DataTable
Dim harun As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.ACCDB")
Public Sub muhharun()
Dim mhh As New OleDb.OleDbDataAdapter
mhh = New OleDb.OleDbDataAdapter("select * from barang", harun)
rr.Rows.Clear()
mhh.Fill(rr)
mhh.Dispose()
End Sub
Private Sub Form32A_36109006_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
muhharun()
dgv_36109006.DataSource = rr
End Sub
Private Sub tambah_36109006_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tambah_36109006.Click
If Form32B_36109006.Visible = False Then
Form32B_36109006.Show()
Else
Form32B_36109006.Activate()
End If
End Sub
Private Sub edit_36109006_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles edit_36109006.Click
If Form32C_36109006.Visible = False Then
Form32C_36109006.Show()
Else
Form32C_36109006.Activate()
End If
Form32C_36109006.kb_36109006.Text = dgv_36109006.CurrentRow.Cells("kodebarang").Value
Form32C_36109006.nb_36109006.Text = dgv_36109006.CurrentRow.Cells("namabarang").Value
Form32C_36109006.hj_36109006.Text = dgv_36109006.CurrentRow.Cells("hargajual").Value
Form32C_36109006.jb_36109006.Text = dgv_36109006.CurrentRow.Cells("jumlahbarang").Value
Form32C_36109006.ee_36109006.Text = dgv_36109006.CurrentRow.Cells("kodebarang").Value
Form32C_36109006.Show()
End Sub
End Class
Public Class Form32B_36109006
BalasHapusDim harun As New ByIskandar.CariKeDataBaseByIskandar
Dim cm As New OleDb.OleDbCommand
Dim mhh As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.ACCDB")
Private Sub simpan_36109006_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles simpan_36109006.Click
If txt1_36109006.Text.Length = 0 Then
MsgBox("Isi rong itu yang kosong")
Exit Sub
End If
If txt2_36109006.Text.Length = 0 Then
MsgBox("Isi yang kosong")
Exit Sub
End If
If Val(txt_36109006.Text) = 0 Then
MsgBox("Isi yang kosong")
Exit Sub
End If
If Val(txt4_36109006.Text) = 0 Then
MsgBox("Isi yang kosong")
Exit Sub
End If
harun.AturPencarianDataBase("Barang", "KodeBarang", txt1_36109006.Text, 1, mhh)
If harun.JumlanBaris > 0 Then
MsgBox("Kode barang sudah ada")
Exit Sub
End If
cm = New OleDb.OleDbCommand("insert into barang (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & txt1_36109006.Text & "','" & txt2_36109006.Text & "'," & Val(txt_36109006.Text) & "," & Val(txt4_36109006.Text) & ")", mhh)
mhh.Open()
cm.ExecuteNonQuery()
mhh.Close()
cm.Dispose()
txt1_36109006.Text = ""
txt2_36109006.Text = ""
txt_36109006.Text = ""
txt4_36109006.Text = ""
End Sub
End Class
Public Class Form32C_36109006
BalasHapusDim harun As New ByIskandar.CariKeDataBaseByIskandar
Dim rr As New OleDb.OleDbCommand
Dim mhh As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.AHJ_36109006DB")
Private Sub simpan_36109006_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles simpan_36109006.Click
If kb_36109006.Text.Length = 0 Then
MsgBox("Isi yang kosong")
Exit Sub
End If
If nb_36109006.Text.Length = 0 Then
MsgBox("Isi yang kosong")
Exit Sub
End If
If Val(hj_36109006.Text) = 0 Then
MsgBox("Isi yang kosong")
Exit Sub
End If
If Val(jb_36109006.Text) = 0 Then
MsgBox("Isi yang kosong")
Exit Sub
End If
If kb_36109006.Text <> ee_36109006.Text Then
harun.AturPencarianDataBase("Barang", "KodeBarang", kb_36109006.Text, 1, mhh)
If harun.JumlanBaris > 0 Then
MsgBox("Adami kode barang seperti itu")
Exit Sub
End If
End If
rr = New OleDb.OleDbCommand("update barang set kodebarang = '" & kb_36109006.Text & "', namabarang = '" & nb_36109006.Text & "', hargajual = " & Val(hj_36109006.Text) & ", jumlahbarang = " & Val(jb_36109006.Text) & " where kodebarang = '" & ee_36109006.Text & "'", mhh)
mhh.Open()
rr.ExecuteNonQuery()
mhh.Close()
rr.Dispose()
kb_36109006.Text = ""
nb_36109006.Text = ""
hj_36109006.Text = ""
jb_36109006.Text = ""
ee_36109006.Text = ""
Form32A_36109006.harun()
End Sub
End Class
Public Class Form32B_36109001
BalasHapusDim apreal As New ByIskandar.CariKeDataBaseByIskandar
Dim cm As New OleDb.OleDbCommand
Dim imps As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.ACCDB")
Private Sub ee_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn1_36109001.Click
If txt1_36109001.Text.Length = 0 Then
MsgBox("Silahkan isi yang kosong")
Exit Sub
End If
If txt2_36109001.Text.Length = 0 Then
MsgBox("Silahkan isi yang kosong")
Exit Sub
End If
If Val(txt_36109001.Text) = 0 Then
MsgBox("Silahkan isi yang kosong")
Exit Sub
End If
If Val(txt4_36109001.Text) = 0 Then
MsgBox("Silahkan isi yang kosong")
Exit Sub
End If
apreal.AturPencarianDataBase("Barang", "KodeBarang", txt1_36109001.Text, 1, imps)
If apreal.JumlanBaris > 0 Then
MsgBox("Adami kode barang seperti itu")
Exit Sub
End If
cm = New OleDb.OleDbCommand("insert into barang (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & txt1_36109001.Text & "','" & txt2_36109001.Text & "'," & Val(txt_36109001.Text) & "," & Val(txt4_36109001.Text) & ")", imps)
imps.Open()
cm.ExecuteNonQuery()
imps.Close()
cm.Dispose()
txt1_36109001.Text = ""
txt2_36109001.Text = ""
txt_36109001.Text = ""
txt4_36109001.Text = ""
Form32A_36109001.apreal()
End Sub
Private Sub Form32B_36109001_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Public Class Form32C_36109001
BalasHapusDim apreal As New ByIskandar.CariKeDataBaseByIskandar
Dim rr As New OleDb.OleDbCommand
Dim imps As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.AHJ_36109001DB")
Private Sub btn_36109001_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_36109001.Click
If kb_36109001.Text.Length = 0 Then
MsgBox("Silahkan isi yang kosong")
Exit Sub
End If
If nb_36109001.Text.Length = 0 Then
MsgBox("Silahkan isi yang kosong")
Exit Sub
End If
If Val(hj_36109001.Text) = 0 Then
MsgBox("Silahkan isi yang kosong")
Exit Sub
End If
If Val(jb_36109001.Text) = 0 Then
MsgBox("Silahkan isi yang kosong")
Exit Sub
End If
If kb_36109001.Text <> ee.Text Then
apreal.AturPencarianDataBase("Barang", "KodeBarang", kb_36109001.Text, 1, imps)
If apreal.JumlanBaris > 0 Then
MsgBox("Adami kode barang seperti itu")
Exit Sub
End If
End If
rr = New OleDb.OleDbCommand("update barang set kodebarang = '" & kb_36109001.Text & "', namabarang = '" & nb_36109001.Text & "', hargajual = " & Val(hj_36109001.Text) & ", jumlahbarang = " & Val(jb_36109001.Text) & " where kodebarang = '" & ee.Text & "'", imps)
imps.Open()
rr.ExecuteNonQuery()
imps.Close()
rr.Dispose()
kb_36109001.Text = ""
nb_36109001.Text = ""
hj_36109001.Text = ""
jb_36109001.Text = ""
ee.Text = ""
Form32A_36109001.apreal()
End Sub
Private Sub Latihan_32C_022_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
ANDI WAHYUNI
BalasHapus361 09 019
http://wahyunistrongggg.blogspot.com/2011/11/latihan-27-32.html
iwan
BalasHapus361 09 026
3a-d3
http://iwandinejad.blogspot.com/#!/2012/01/latihan-32a32b32c.html
Komentar ini telah dihapus oleh pengarang.
BalasHapus