Public Class LATIHAN032A36109033 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\databarang.accdb") Dim tiwi As New DataTable Private Sub latihan153619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobajaa As New OleDb.OleDbDataAdapter cobajaa = New OleDb.OleDbDataAdapter("select * from barang", CONECT) cobajaa.Fill(tiwi) DataGridView1.DataSource = tiwi End Sub Private Sub Button136109033_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109033.Click If LATIHAN032C36109033.Visible = False Then LATIHAN032C36109033.Show() Else LATIHAN032C36109033.Activate() End If LATIHAN032C36109033.ToolStripStatusLabel1.Text = "kode barang lama= " & DataGridView1.CurrentRow.Cells("KodeBarang").Value LATIHAN032C36109033.t136109033.Text = DataGridView1.CurrentRow.Cells("KodeBarang").Value LATIHAN032C36109033.t236109033.Text = DataGridView1.CurrentRow.Cells("NamaBarang").Value LATIHAN032C36109033.t336109033.Text = DataGridView1.CurrentRow.Cells("Hargajual").Value LATIHAN032C36109033.t436109033.Text = DataGridView1.CurrentRow.Cells("jumlahbarang").Value End Sub
Private Sub Button236109033_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button236109033.Click If LATIHAN032B36109033.Visible = False Then LATIHAN032B36109033.Show() Else LATIHAN032B36109033.Activate() End If
Dim CONECT As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb") Private Sub Button136109033_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109033.Click
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 Dim tiwi As New OleDb.OleDbCommand tiwi = New OleDb.OleDbCommand("PsTambahBarang", Conect) tiwi.CommandType = CommandType.StoredProcedure tiwi.Parameters.Add(New OleDb.OleDbParameter("pKodeBarang", t136109033.Text)) tiwi.Parameters.Add(New OleDb.OleDbParameter("pNamaBarang", t236109033.Text)) tiwi.Parameters.Add(New OleDb.OleDbParameter("pPersawal", Val(t336109033.Text))) tiwi.Parameters.Add(New OleDb.OleDbParameter("pHargajual", Val(t436109033.Text))) Conect.Open() tiwi.ExecuteNonQuery() Conect.Close() tiwi.Dispose()
Public Class LATIHAN032C36109033 Dim CONECT As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb") Private Sub Button136109033_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109033.Click 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 Dim com As New OleDb.OleDbCommand com = New OleDb.OleDbCommand("UPDATE BARANG SET kodebarang = '" & t136109033.Text & "', namabarang = '" & t236109033.Text & "', hargajual = " & Val(t336109033.Text) & ", jumlahbarang = " & Val(t436109033.Text) & " where kodebarang ='" & ToolStripStatusLabel1.Text & "'", CONECT)
Public Class LATIHAN032A36109033 Dim CONECT As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=tahir") Dim tiwi As New DataTable Private Sub latihan153619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobajaa As New OleDb.OleDbDataAdapter cobajaa = New OleDb.OleDbDataAdapter("select * from barang", CONECT) cobajaa.Fill(tiwi) DataGridView1.DataSource = tiwi End Sub Private Sub Button136109033_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109033.Click If LATIHAN032C36109033.Visible = False Then LATIHAN032C36109033.Show() Else LATIHAN032C36109033.Activate() End If LATIHAN032C36109033.ToolStripStatusLabel1.Text = "kode barang lama= " & DataGridView1.CurrentRow.Cells("KodeBarang").Value LATIHAN032C36109033.t136109033.Text = DataGridView1.CurrentRow.Cells("KodeBarang").Value LATIHAN032C36109033.t236109033.Text = DataGridView1.CurrentRow.Cells("NamaBarang").Value LATIHAN032C36109033.t336109033.Text = DataGridView1.CurrentRow.Cells("Hargajual").Value LATIHAN032C36109033.t436109033.Text = DataGridView1.CurrentRow.Cells("jumlahbarang").Value End Sub
Private Sub Button236109033_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button236109033.Click If LATIHAN032B36109033.Visible = False Then LATIHAN032B36109033.Show() Else LATIHAN032B36109033.Activate() End If
End Sub
End Class
Public Class LATIHAN032B36109033
Dim CONECT As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=tahir") Private Sub Button136109033_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109033.Click
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 Dim tiwi As New OleDb.OleDbCommand tiwi = New OleDb.OleDbCommand("PsTambahBarang", Conect) tiwi.CommandType = CommandType.StoredProcedure tiwi.Parameters.Add(New OleDb.OleDbParameter("pKodeBarang", t136109033.Text)) tiwi.Parameters.Add(New OleDb.OleDbParameter("pNamaBarang", t236109033.Text)) tiwi.Parameters.Add(New OleDb.OleDbParameter("pPersawal", Val(t336109033.Text))) tiwi.Parameters.Add(New OleDb.OleDbParameter("pHargajual", Val(t436109033.Text))) Conect.Open() tiwi.ExecuteNonQuery() Conect.Close() tiwi.Dispose()
Public Class LATIHAN032C36109033 Dim CONECT As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=tahir") Private Sub Button136109033_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109033.Click 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 Dim com As New OleDb.OleDbCommand com = New OleDb.OleDbCommand("UPDATE BARANG SET kodebarang = '" & t136109033.Text & "', namabarang = '" & t236109033.Text & "', hargajual = " & Val(t336109033.Text) & ", jumlahbarang = " & Val(t436109033.Text) & " where kodebarang ='" & ToolStripStatusLabel1.Text & "'", CONECT)
Public Class Latih32A_36109034 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\databarang.accdb;jet OLEDB:database password=nhunoe") Dim nhunoe As New DataTable Dim baris As DataRow Private Sub latihan153619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select * from barang", conect) cobaji.Fill(nhunoe) DataGridView1.DataSource = nhunoe End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Latih32C_36109034.Visible = False Then Latih32C_36109034.Show() Else Latih32C_36109034.Activate() End If Latih32C_36109034.ToolStripStatusLabel1.Text = DataGridView1.CurrentRow.Cells("KodeBarang").Value Latih32C_36109034.t1.Text = DataGridView1.CurrentRow.Cells("KodeBarang").Value Latih32C_36109034.t2.Text = DataGridView1.CurrentRow.Cells("NamaBarang").Value Latih32C_36109034.t3.Text = DataGridView1.CurrentRow.Cells("Hargajual").Value Latih32C_36109034.t4.Text = DataGridView1.CurrentRow.Cells("jumlahbarang").Value End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If Latih32B_36109034.Visible = False Then Latih32B_36109034.Show() Else Latih32B_36109034.Activate() End If Latih32B_36109034.t1.Text = DataGridView1.CurrentRow.Cells("KodeBarang").Value Latih32B_36109034.t2.Text = DataGridView1.CurrentRow.Cells("NamaBarang").Value Latih32B_36109034.t3.Text = DataGridView1.CurrentRow.Cells("Hargajual").Value Latih32B_36109034.t4.Text = DataGridView1.CurrentRow.Cells("jumlahbarang").Value End Sub End Class
Public Class Latih32B_36109034 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 Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Val(t1.Text) = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If If t2.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If If Val(t3.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If If Val(t4.Text) = 0 Then MsgBox("jumlah barang belum diisi") Exit Sub End If Dim cm As New OleDb.OleDbCommand cm = New OleDb.OleDbCommand("PsTambahBarang", conect) cm.CommandType = CommandType.StoredProcedure cm.Parameters.Add(New OleDb.OleDbParameter("pKodeBarang", t1.Text)) cm.Parameters.Add(New OleDb.OleDbParameter("pNamaBarang", t2.Text)) cm.Parameters.Add(New OleDb.OleDbParameter("pPersawal", Val(t3.Text))) cm.Parameters.Add(New OleDb.OleDbParameter("pHargajual", Val(t4.Text))) conect.Open() cm.ExecuteNonQuery() conect.Close() cm.Dispose() t1.Text = "" t2.Text = "" t3.Text = "" t4.Text = ""
Public Class Latih32C_36109034 Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;jet OLEDB:database password=nhunoe") Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Val(t1.Text) = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If
If t2.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If
If Val(t3.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(t4.Text) = 0 Then MsgBox("jumlah barang belum diisi") Exit Sub End If Dim com As New OleDb.OleDbCommand com = New OleDb.OleDbCommand("UPDATE BARANG SET kodebarang = '" & t1.Text & "', namabarang = '" & t2.Text & "', hargajual = " & Val(t3.Text) & ", jumlahbarang = " & Val(t4.Text) & " where kodebarang ='" & ToolStripStatusLabel1.Text & "'", conect)
Public Class LATIHAN_032C_36109056 Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;jet OLEDB:database password=2422") Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Val(t1_36109056.Text) = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If
If t2_36109056.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If
If Val(t3_36109056.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(t4_36109056.Text) = 0 Then MsgBox("jumlah barang belum diisi") Exit Sub End If Dim com As New OleDb.OleDbCommand com = New OleDb.OleDbCommand("UPDATE BARANG SET kodebarang = '" & t1_36109056.Text & "', namabarang = '" & t2_36109056.Text & "', hargajual = " & Val(t3_36109056.Text) & ", jumlahbarang = " & Val(t4_36109056.Text) & " where kodebarang ='" & ToolStripStatusLabel1.Text & "'", conect)
Public Class LATIHAN32A36109044 Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=magfirah") Dim firah As New DataTable
Private Sub LATIHAN32A36109044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim tes As New OleDb.OleDbDataAdapter tes = New OleDb.OleDbDataAdapter("select * from barang", conect) tes.Fill(firah) DataGridView1.DataSource = firah
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If LATIHAN32C36109044.Visible = False Then LATIHAN32C36109044.Show() Else LATIHAN032C012.Activate() End If LATIHAN32A36109044.ToolStripStatusLabel1.Text = "kode barang lama= " & DataGridView1.CurrentRow.Cells("KodeBarang").Value LATIHAN32C36109044.t1.Text = DataGridView1.CurrentRow.Cells("KodeBarang").Value LATIHAN32C36109044.t2.Text = DataGridView1.CurrentRow.Cells("NamaBarang").Value LATIHAN32C36109044.t3.Text = DataGridView1.CurrentRow.Cells("Hargajual").Value LATIHAN32C36109044.t4.Text = DataGridView1.CurrentRow.Cells("jumlahbarang").Value
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If LATIHAN32B36109044.Visible = False Then LATIHAN32B36109044.Show() Else LATIHAN32B36109044.Activate() End If
Public Class LATIHAN32B36109044 Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=magfirah") Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Val(t1.Text) = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If
If t2.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If
If Val(t3.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(t4.Text) = 0 Then MsgBox("jumlah barang belum diisi") Exit Sub End If Dim cm As New OleDb.OleDbCommand cm = New OleDb.OleDbCommand("PsTambahBarang", conect) cm.CommandType = CommandType.StoredProcedure cm.Parameters.Add(New OleDb.OleDbParameter("pKodeBarang", t1.Text)) cm.Parameters.Add(New OleDb.OleDbParameter("pNamaBarang", t2.Text)) cm.Parameters.Add(New OleDb.OleDbParameter("pPersawal", Val(t3.Text))) cm.Parameters.Add(New OleDb.OleDbParameter("pHargajual", Val(t4.Text))) conect.Open() cm.ExecuteNonQuery() conect.Close() cm.Dispose()
Public Class LATIHAN32C36109044 Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=magfirah") Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Val(t1.Text) = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If
If t2.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If
If Val(t3.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(t4.Text) = 0 Then MsgBox("jumlah barang belum diisi") Exit Sub End If Dim com As New OleDb.OleDbCommand com = New OleDb.OleDbCommand("UPDATE BARANG SET kodebarang = '" & t1.Text & "', namabarang = '" & t2.Text & "', hargajual = " & Val(t3.Text) & ", jumlahbarang = " & Val(t4.Text) & " where kodebarang ='" & ToolStripStatusLabel1.Text & "'", conect)
Public Class LATIHAN032B36109038 Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\DATABARANG.accdb;Jet OLEDB:Database Password=icha") Dim cari As New ByIskandar.CariKeDataBaseByIskandar
Private Sub Button136109038_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button136109038.Click If t136109038.Text.Length = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If
If t236109038.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If
If Val(t336109038.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(t436109038.Text) = 0 Then MsgBox("jumlah barang") 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('" & t136109038.Text & "','" & t236109038.Text & "'," & Val(t336109038.Text) & "," & Val(t436109038.Text) & ")", conect)
Public Class LATIHAN032C36109038 Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\DATABARANG.accdb;Jet OLEDB:Database Password=icha") Dim cari As New ByIskandar.CariKeDataBaseByIskandar
Private Sub Button136109038_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button136109038.Click If t136109038.Text.Length = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If
If t236109038.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If
If Val(t336109038.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(t436109038.Text) = 0 Then MsgBox("JUMLAH BELUM TERISI") Exit Sub End If
If KB36109038.Text <> t136109038.Text Then cari.AturPencarianDataBase("barang", "kodebarang", t136109038.Text, 1, conect)
If cari.JumlanBaris > 0 Then MsgBox("kode sudah ada") Exit Sub End If End If
Dim com As New OleDb.OleDbCommand com = New OleDb.OleDbCommand("update barang set kodebarang ='" & t136109038.Text & "',namabarang='" & t236109038.Text & "',hargajual=" & Val(t336109038.Text) & ", jumlahbarang=" & Val(t436109038.Text) & " where kodebarang='" & KB36109038.Text & "'", conect)
Public Class Lat32A36109042 Dim Connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\databarang.accdb; Jet OLEDB:Database Password=25") Dim Ijal As New DataTable Private Sub latihan153619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select * from barang", Connect) cobaji.Fill(Ijal) DataGridView1.DataSource = Ijal End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Lat32C36109042.Visible = False Then Lat32C36109042.Show() Else Lat32C36109042.Activate() End If Lat32C36109042.ToolStripStatusLabel1.Text = DataGridView1.CurrentRow.Cells("KodeBarang").Value Lat32C36109042.t136109042.Text = DataGridView1.CurrentRow.Cells("KodeBarang").Value Lat32C36109042.t236109042.Text = DataGridView1.CurrentRow.Cells("NamaBarang").Value Lat32C36109042.t336109042.Text = DataGridView1.CurrentRow.Cells("Hargajual").Value Lat32C36109042.t436109042.Text = DataGridView1.CurrentRow.Cells("jumlahbarang").Value End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If Lat32B36109042.Visible = False Then Lat32B36109042.Show() Else Lat32B36109042.Activate() End If
Public Class Lat32B36109042 Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb; Jet OLEDB:Database Password=25") Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109042.Click
If Val(t136109042.Text) = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If
If t236109042.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If
If Val(t336109042.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(t436109042.Text) = 0 Then MsgBox("jumlah barang belum diisi") Exit Sub End If Dim cm As New OleDb.OleDbCommand cm = New OleDb.OleDbCommand("PsTambahBarang", conect) cm.CommandType = CommandType.StoredProcedure
Public Class Lat32C36109042 Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb; Jet OLEDB:Database Password=25") Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109042.Click If Val(t136109042.Text) = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If
If t236109042.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If
If Val(t336109042.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(t436109042.Text) = 0 Then MsgBox("jumlah barang belum diisi") Exit Sub End If Dim com As New OleDb.OleDbCommand com = New OleDb.OleDbCommand("UPDATE BARANG SET kodebarang = '" & t136109042.Text & "', namabarang = '" & t236109042.Text & "', hargajual = " & Val(t336109042.Text) & ", jumlahbarang = " & Val(t436109042.Text) & " where kodebarang ='" & ToolStripStatusLabel1.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 LATIHAN032A36109032_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim lanjutkan As New OleDb.OleDbDataAdapter lanjutkan = New OleDb.OleDbDataAdapter("select * from barang", sambung) lanjutkan.Fill(pusat) DataGridView136109032.DataSource = pusat End Sub
Private Sub Button136109032_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109032.Click If LATIHAN032C36109032.Visible = False Then LATIHAN032C36109032.Show() Else LATIHAN032C36109032.Activate() End If LATIHAN032C36109032.ToolStripStatusLabel1.Text = "kode barang lama= " & DataGridView136109032.CurrentRow.Cells("KodeBarang").Value LATIHAN032C36109032.t1.Text = DataGridView136109032.CurrentRow.Cells("KodeBarang").Value LATIHAN032C36109032.t2.Text = DataGridView136109032.CurrentRow.Cells("NamaBarang").Value LATIHAN032C36109032.t3.Text = DataGridView136109032.CurrentRow.Cells("Hargajual").Value LATIHAN032C36109032.t4.Text = DataGridView136109032.CurrentRow.Cells("jumlahbarang").Value End Sub
Private Sub Button236109032_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button236109032.Click If LATIHAN032B36109032.Visible = False Then LATIHAN032B36109032.Show() Else LATIHAN032B36109032.Activate() End If
Public Class Latihan32A36109046 Dim Jalan As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\DATABARANG.accdb;Jet OLEDB:Database Password=14322836") Dim ambil As New DataTable Public Sub ambildata() Dim data As New OleDb.OleDbDataAdapter data = New OleDb.OleDbDataAdapter("SELECT* FROM barang", Jalan) ambil.Rows.Clear() data.Fill(ambil) data.Dispose() End Sub Private Sub Latihan32A36109046_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ambildata() DataGridView136109046.DataSource = ambil End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Latihan31B36109046.Visible = False Then Latihan31B36109046.Show() Else Latihan31B36109046.Activate() End If Latihan31B36109046.KB36109046.Text = DataGridView136109046.CurrentRow.Cells("KODEBARANG").Value Latihan31B36109046.t136109046.Text = DataGridView136109046.CurrentRow.Cells("KODEBARANG").Value Latihan31B36109046.t236109046.Text = DataGridView136109046.CurrentRow.Cells("NAMABARANG").Value Latihan31B36109046.t336109046.Text = DataGridView136109046.CurrentRow.Cells("HARGAJUAL").Value Latihan31B36109046.t436109046.Text = DataGridView136109046.CurrentRow.Cells("JUMLAHBARANG").Value End Sub End Class Public Class Latihan32B36109046 Dim Jalan As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\DATABARANG.accdb;Jet OLEDB:Database Password=14322836") Dim ambil As New DataTable Public Sub ambildata() Dim data As New OleDb.OleDbDataAdapter data = New OleDb.OleDbDataAdapter("SELECT* FROM barang", Jalan) ambil.Rows.Clear() data.Fill(ambil) data.Dispose() End Sub Private Sub Latihan31A36109046_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ambildata() DataGridView136109046.DataSource = ambil End Sub Private Sub Button136109046_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109046.Click If Latihan31B36109046.Visible = False Then Latihan31B36109046.Show() Else Latihan31B36109046.Activate() End If Latihan31B36109046.KB36109046.Text = DataGridView136109046.CurrentRow.Cells("KODEBARANG").Value Latihan31B36109046.t136109046.Text = DataGridView136109046.CurrentRow.Cells("KODEBARANG").Value Latihan31B36109046.t236109046.Text = DataGridView136109046.CurrentRow.Cells("NAMABARANG").Value Latihan31B36109046.t336109046.Text = DataGridView136109046.CurrentRow.Cells("HARGAJUAL").Value Latihan31B36109046.t436109046.Text = DataGridView136109046.CurrentRow.Cells("JUMLAHBARANG").Value End Sub End Class
Public Class Latihan32C36109046 Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=14322836") 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 BELUM TERISI") Exit Sub End If If KB.Text <> t136109046.Text Then cari.AturPencarianDataBase("barang", "kodebarang", t136109046.Text, 1, conect) If cari.JumlanBaris > 0 Then MsgBox("kode sudah ada") Exit Sub End If End If Dim com As New OleDb.OleDbCommand com = New OleDb.OleDbCommand("update barang set kodebarang ='" & t136109046.Text & "',namabarang='" & t236109046.Text & "',hargajual=" & Val(t336109046.Text) & ", jumlahbarang=" & Val(t436109050.Text) & " where kodebarang='" & KB.Text & "'", conect) conect.Open() com.ExecuteNonQuery() conect.Close() com.Dispose() t136109046.Text = "" t236109046.Text = "" t336109046.Text = "" t436109046.Text = "" KB.Text = "-"
Dim sambung As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=jayapura")
Private Sub Button136109032_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109032.Click If Val(T136109032.Text) = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If
If T236109032.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If
If Val(T336109032.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(T436109032.Text) = 0 Then MsgBox("jumlah barang belum diisi") Exit Sub End If Dim com As New OleDb.OleDbCommand com = New OleDb.OleDbCommand("UPDATE BARANG SET kodebarang = '" & T136109032.Text & "', namabarang = '" & T236109032.Text & "', hargajual = " & Val(T336109032.Text) & ", jumlahbarang = " & Val(T436109032.Text) & " where kodebarang ='" & ToolStripStatusLabel1.Text & "'", sambung)
Public Class Latihan_32A36109055 Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=25") Dim tes As New DataTable Public Sub falah() Dim adap As New OleDb.OleDbDataAdapter adap = New OleDb.OleDbDataAdapter("select * from barang", conect) tes.Rows.Clear() adap.Fill(tes) adap.Dispose()
End Sub
Private Sub Latihan_32A36109055_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load falah() DataGridView136109055.DataSource = tes End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If Latihan_32B36109055.Visible = False Then Latihan_32B36109055.Show() Else Latihan_32B36109055.Activate() End If End Sub End Class
Public Class Latihan_32B36109055 Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=25") Dim cari As New ByIskandar.CariKeDataBaseByIskandar
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If t136109055.Text.Length = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If
If t236109055.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If
If Val(t336109055.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(t436109055.Text) = 0 Then MsgBox("jumlah barang") 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('" & t136109055.Text & "','" & t236109055.Text & "'," & Val(t336109055.Text) & "," & Val(t436109055.Text) & ")", conect)
Public Class LATIHAN032C012 Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=25") Dim coba As New ByIskandar.CariKeDataBaseByIskandar
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If t136109055.Text.Length = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If
If t236109055.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If
If Val(t336109055.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(t436109055.Text) = 0 Then MsgBox("JUMLAH BELUM TERISI") Exit Sub End If
If KB.Text <> t136109055.Text Then coba.AturPencarianDataBase("barang", "kodebarang", t136109055.Text, 1, conect)
If coba.JumlanBaris > 0 Then MsgBox("kode sudah ada") Exit Sub End If End If
Dim com As New OleDb.OleDbCommand com = New OleDb.OleDbCommand("update barang set kodebarang ='" & t136109055.Text & "',namabarang='" & t236109055.Text & "',hargajual=" & Val(t336109055.Text) & ", jumlahbarang=" & Val(t436109055.Text) & " where kodebarang='" & KB.Text & "'", conect)
Public Class Latih32C36109040 Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;jet OLEDB:database password=150991") Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Val(t1.Text) = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If
If t2.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If
If Val(t3.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(t4.Text) = 0 Then MsgBox("jumlah barang belum diisi") Exit Sub End If Dim com As New OleDb.OleDbCommand com = New OleDb.OleDbCommand("UPDATE BARANG SET kodebarang = '" & t1.Text & "', namabarang = '" & t2.Text & "', hargajual = " & Val(t3.Text) & ", jumlahbarang = " & Val(t4.Text) & " where kodebarang ='" & ToolStripStatusLabel1.Text & "'", conect)
Public Class LATIHAN032B36109030 Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb; Jet OLEDB:Database Password=sanie") Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Val(t1.Text) = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If
If t2.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If
If Val(t3.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(t4.Text) = 0 Then MsgBox("jumlah barang belum diisi") Exit Sub End If Dim cm As New OleDb.OleDbCommand cm = New OleDb.OleDbCommand("PsTambahBarang", conect) cm.CommandType = CommandType.StoredProcedure
Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb; Jet OLEDB:Database Password=sanie") Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Val(t1.Text) = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If
If t2.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If
If Val(t3.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(t4.Text) = 0 Then MsgBox("jumlah barang belum diisi") Exit Sub End If Dim com As New OleDb.OleDbCommand com = New OleDb.OleDbCommand("UPDATE BARANG SET kodebarang = '" & t1.Text & "', namabarang = '" & t2.Text & "', hargajual = " & Val(t3.Text) & ", jumlahbarang = " & Val(t4.Text) & " where kodebarang ='" & ToolStripStatusLabel1.Text & "'", conect)
Public Class LATIHAN032A36109033
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\databarang.accdb")
Dim tiwi As New DataTable
Private Sub latihan153619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobajaa As New OleDb.OleDbDataAdapter
cobajaa = New OleDb.OleDbDataAdapter("select * from barang", CONECT)
cobajaa.Fill(tiwi)
DataGridView1.DataSource = tiwi
End Sub
Private Sub Button136109033_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109033.Click
If LATIHAN032C36109033.Visible = False Then
LATIHAN032C36109033.Show()
Else
LATIHAN032C36109033.Activate()
End If
LATIHAN032C36109033.ToolStripStatusLabel1.Text = "kode barang lama= " & DataGridView1.CurrentRow.Cells("KodeBarang").Value
LATIHAN032C36109033.t136109033.Text = DataGridView1.CurrentRow.Cells("KodeBarang").Value
LATIHAN032C36109033.t236109033.Text = DataGridView1.CurrentRow.Cells("NamaBarang").Value
LATIHAN032C36109033.t336109033.Text = DataGridView1.CurrentRow.Cells("Hargajual").Value
LATIHAN032C36109033.t436109033.Text = DataGridView1.CurrentRow.Cells("jumlahbarang").Value
End Sub
Private Sub Button236109033_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button236109033.Click
If LATIHAN032B36109033.Visible = False Then
LATIHAN032B36109033.Show()
Else
LATIHAN032B36109033.Activate()
End If
End Sub
End Class
Public Class LATIHAN032B36109033
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb")
Private Sub Button136109033_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109033.Click
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
Dim tiwi As New OleDb.OleDbCommand
tiwi = New OleDb.OleDbCommand("PsTambahBarang", Conect)
tiwi.CommandType = CommandType.StoredProcedure
tiwi.Parameters.Add(New OleDb.OleDbParameter("pKodeBarang", t136109033.Text))
tiwi.Parameters.Add(New OleDb.OleDbParameter("pNamaBarang", t236109033.Text))
tiwi.Parameters.Add(New OleDb.OleDbParameter("pPersawal", Val(t336109033.Text)))
tiwi.Parameters.Add(New OleDb.OleDbParameter("pHargajual", Val(t436109033.Text)))
Conect.Open()
tiwi.ExecuteNonQuery()
Conect.Close()
tiwi.Dispose()
t136109033.Text = ""
t236109033.Text = ""
t336109033.Text = ""
t436109033.Text = ""
End Sub
Private Sub LATIHAN032B36109033_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Public Class LATIHAN032C36109033
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb")
Private Sub Button136109033_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109033.Click
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
Dim com As New OleDb.OleDbCommand
com = New OleDb.OleDbCommand("UPDATE BARANG SET kodebarang = '" & t136109033.Text & "', namabarang = '" & t236109033.Text & "', hargajual = " & Val(t336109033.Text) & ", jumlahbarang = " & Val(t436109033.Text) & " where kodebarang ='" & ToolStripStatusLabel1.Text & "'", CONECT)
CONECT.Open()
com.ExecuteNonQuery()
CONECT.Close()
com.Dispose()
t136109033.Text = ""
t236109033.Text = ""
t336109033.Text = ""
t436109033.Text = ""
End Sub
End Class
revisi :)
BalasHapusPublic Class LATIHAN032A36109033
Dim CONECT As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=tahir")
Dim tiwi As New DataTable
Private Sub latihan153619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobajaa As New OleDb.OleDbDataAdapter
cobajaa = New OleDb.OleDbDataAdapter("select * from barang", CONECT)
cobajaa.Fill(tiwi)
DataGridView1.DataSource = tiwi
End Sub
Private Sub Button136109033_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109033.Click
If LATIHAN032C36109033.Visible = False Then
LATIHAN032C36109033.Show()
Else
LATIHAN032C36109033.Activate()
End If
LATIHAN032C36109033.ToolStripStatusLabel1.Text = "kode barang lama= " & DataGridView1.CurrentRow.Cells("KodeBarang").Value
LATIHAN032C36109033.t136109033.Text = DataGridView1.CurrentRow.Cells("KodeBarang").Value
LATIHAN032C36109033.t236109033.Text = DataGridView1.CurrentRow.Cells("NamaBarang").Value
LATIHAN032C36109033.t336109033.Text = DataGridView1.CurrentRow.Cells("Hargajual").Value
LATIHAN032C36109033.t436109033.Text = DataGridView1.CurrentRow.Cells("jumlahbarang").Value
End Sub
Private Sub Button236109033_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button236109033.Click
If LATIHAN032B36109033.Visible = False Then
LATIHAN032B36109033.Show()
Else
LATIHAN032B36109033.Activate()
End If
End Sub
End Class
Public Class LATIHAN032B36109033
Dim CONECT As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=tahir")
Private Sub Button136109033_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109033.Click
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
Dim tiwi As New OleDb.OleDbCommand
tiwi = New OleDb.OleDbCommand("PsTambahBarang", Conect)
tiwi.CommandType = CommandType.StoredProcedure
tiwi.Parameters.Add(New OleDb.OleDbParameter("pKodeBarang", t136109033.Text))
tiwi.Parameters.Add(New OleDb.OleDbParameter("pNamaBarang", t236109033.Text))
tiwi.Parameters.Add(New OleDb.OleDbParameter("pPersawal", Val(t336109033.Text)))
tiwi.Parameters.Add(New OleDb.OleDbParameter("pHargajual", Val(t436109033.Text)))
Conect.Open()
tiwi.ExecuteNonQuery()
Conect.Close()
tiwi.Dispose()
t136109033.Text = ""
t236109033.Text = ""
t336109033.Text = ""
t436109033.Text = ""
End Sub
Private Sub LATIHAN032B36109033_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Public Class LATIHAN032C36109033
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=tahir")
Private Sub Button136109033_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109033.Click
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
Dim com As New OleDb.OleDbCommand
com = New OleDb.OleDbCommand("UPDATE BARANG SET kodebarang = '" & t136109033.Text & "', namabarang = '" & t236109033.Text & "', hargajual = " & Val(t336109033.Text) & ", jumlahbarang = " & Val(t436109033.Text) & " where kodebarang ='" & ToolStripStatusLabel1.Text & "'", CONECT)
CONECT.Open()
com.ExecuteNonQuery()
CONECT.Close()
com.Dispose()
t136109033.Text = ""
t236109033.Text = ""
t336109033.Text = ""
t436109033.Text = ""
End Sub
End Class
Public Class Latih32A_36109034
BalasHapusDim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\databarang.accdb;jet OLEDB:database password=nhunoe")
Dim nhunoe As New DataTable
Dim baris As DataRow
Private Sub latihan153619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select * from barang", conect)
cobaji.Fill(nhunoe)
DataGridView1.DataSource = nhunoe
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Latih32C_36109034.Visible = False Then
Latih32C_36109034.Show()
Else
Latih32C_36109034.Activate()
End If
Latih32C_36109034.ToolStripStatusLabel1.Text = DataGridView1.CurrentRow.Cells("KodeBarang").Value
Latih32C_36109034.t1.Text = DataGridView1.CurrentRow.Cells("KodeBarang").Value
Latih32C_36109034.t2.Text = DataGridView1.CurrentRow.Cells("NamaBarang").Value
Latih32C_36109034.t3.Text = DataGridView1.CurrentRow.Cells("Hargajual").Value
Latih32C_36109034.t4.Text = DataGridView1.CurrentRow.Cells("jumlahbarang").Value
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If Latih32B_36109034.Visible = False Then
Latih32B_36109034.Show()
Else
Latih32B_36109034.Activate()
End If
Latih32B_36109034.t1.Text = DataGridView1.CurrentRow.Cells("KodeBarang").Value
Latih32B_36109034.t2.Text = DataGridView1.CurrentRow.Cells("NamaBarang").Value
Latih32B_36109034.t3.Text = DataGridView1.CurrentRow.Cells("Hargajual").Value
Latih32B_36109034.t4.Text = DataGridView1.CurrentRow.Cells("jumlahbarang").Value
End Sub
End Class
Public Class Latih32B_36109034
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 Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Val(t1.Text) = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If t2.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(t3.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(t4.Text) = 0 Then
MsgBox("jumlah barang belum diisi")
Exit Sub
End If
Dim cm As New OleDb.OleDbCommand
cm = New OleDb.OleDbCommand("PsTambahBarang", conect)
cm.CommandType = CommandType.StoredProcedure
cm.Parameters.Add(New OleDb.OleDbParameter("pKodeBarang", t1.Text))
cm.Parameters.Add(New OleDb.OleDbParameter("pNamaBarang", t2.Text))
cm.Parameters.Add(New OleDb.OleDbParameter("pPersawal", Val(t3.Text)))
cm.Parameters.Add(New OleDb.OleDbParameter("pHargajual", Val(t4.Text)))
conect.Open()
cm.ExecuteNonQuery()
conect.Close()
cm.Dispose()
t1.Text = ""
t2.Text = ""
t3.Text = ""
t4.Text = ""
End Sub
End Class
Public Class Latih32C_36109034
BalasHapusDim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;jet OLEDB:database password=nhunoe")
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Val(t1.Text) = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If t2.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(t3.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(t4.Text) = 0 Then
MsgBox("jumlah barang belum diisi")
Exit Sub
End If
Dim com As New OleDb.OleDbCommand
com = New OleDb.OleDbCommand("UPDATE BARANG SET kodebarang = '" & t1.Text & "', namabarang = '" & t2.Text & "', hargajual = " & Val(t3.Text) & ", jumlahbarang = " & Val(t4.Text) & " where kodebarang ='" & ToolStripStatusLabel1.Text & "'", conect)
conect.Open()
com.ExecuteNonQuery()
conect.Close()
com.Dispose()
t1.Text = ""
t2.Text = ""
t3.Text = ""
t4.Text = ""
End Sub
End Class
Public Class LATIHAN_032C_36109056
BalasHapusDim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;jet OLEDB:database password=2422")
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Val(t1_36109056.Text) = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If t2_36109056.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(t3_36109056.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(t4_36109056.Text) = 0 Then
MsgBox("jumlah barang belum diisi")
Exit Sub
End If
Dim com As New OleDb.OleDbCommand
com = New OleDb.OleDbCommand("UPDATE BARANG SET kodebarang = '" & t1_36109056.Text & "', namabarang = '" & t2_36109056.Text & "', hargajual = " & Val(t3_36109056.Text) & ", jumlahbarang = " & Val(t4_36109056.Text) & " where kodebarang ='" & ToolStripStatusLabel1.Text & "'", conect)
conect.Open()
com.ExecuteNonQuery()
conect.Close()
com.Dispose()
t1_36109056.Text = ""
t2_36109056.Text = ""
t3_36109056.Text = ""
t4_36109056.Text = ""
End Sub
End Class
Public Class LATIHAN32A36109044
BalasHapusDim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=magfirah")
Dim firah As New DataTable
Private Sub LATIHAN32A36109044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim tes As New OleDb.OleDbDataAdapter
tes = New OleDb.OleDbDataAdapter("select * from barang", conect)
tes.Fill(firah)
DataGridView1.DataSource = firah
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If LATIHAN32C36109044.Visible = False Then
LATIHAN32C36109044.Show()
Else
LATIHAN032C012.Activate()
End If
LATIHAN32A36109044.ToolStripStatusLabel1.Text = "kode barang lama= " & DataGridView1.CurrentRow.Cells("KodeBarang").Value
LATIHAN32C36109044.t1.Text = DataGridView1.CurrentRow.Cells("KodeBarang").Value
LATIHAN32C36109044.t2.Text = DataGridView1.CurrentRow.Cells("NamaBarang").Value
LATIHAN32C36109044.t3.Text = DataGridView1.CurrentRow.Cells("Hargajual").Value
LATIHAN32C36109044.t4.Text = DataGridView1.CurrentRow.Cells("jumlahbarang").Value
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If LATIHAN32B36109044.Visible = False Then
LATIHAN32B36109044.Show()
Else
LATIHAN32B36109044.Activate()
End If
End Sub
End Class
Public Class LATIHAN32B36109044
BalasHapusDim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=magfirah")
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Val(t1.Text) = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If t2.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(t3.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(t4.Text) = 0 Then
MsgBox("jumlah barang belum diisi")
Exit Sub
End If
Dim cm As New OleDb.OleDbCommand
cm = New OleDb.OleDbCommand("PsTambahBarang", conect)
cm.CommandType = CommandType.StoredProcedure
cm.Parameters.Add(New OleDb.OleDbParameter("pKodeBarang", t1.Text))
cm.Parameters.Add(New OleDb.OleDbParameter("pNamaBarang", t2.Text))
cm.Parameters.Add(New OleDb.OleDbParameter("pPersawal", Val(t3.Text)))
cm.Parameters.Add(New OleDb.OleDbParameter("pHargajual", Val(t4.Text)))
conect.Open()
cm.ExecuteNonQuery()
conect.Close()
cm.Dispose()
t1.Text = ""
t2.Text = ""
t3.Text = ""
t4.Text = ""
End Sub
End Class
Public Class LATIHAN32C36109044
BalasHapusDim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=magfirah")
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Val(t1.Text) = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If t2.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(t3.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(t4.Text) = 0 Then
MsgBox("jumlah barang belum diisi")
Exit Sub
End If
Dim com As New OleDb.OleDbCommand
com = New OleDb.OleDbCommand("UPDATE BARANG SET kodebarang = '" & t1.Text & "', namabarang = '" & t2.Text & "', hargajual = " & Val(t3.Text) & ", jumlahbarang = " & Val(t4.Text) & " where kodebarang ='" & ToolStripStatusLabel1.Text & "'", conect)
conect.Open()
com.ExecuteNonQuery()
conect.Close()
com.Dispose()
t1.Text = ""
t2.Text = ""
t3.Text = ""
t4.Text = ""
End Sub
End Class
Public Class LATIHAN032B36109038
BalasHapusDim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\DATABARANG.accdb;Jet OLEDB:Database Password=icha")
Dim cari As New ByIskandar.CariKeDataBaseByIskandar
Private Sub Button136109038_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button136109038.Click
If t136109038.Text.Length = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If t236109038.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(t336109038.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(t436109038.Text) = 0 Then
MsgBox("jumlah barang")
Exit Sub
End If
cari.AturPencarianDataBase("barang", "kodebarang", t136109038.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('" & t136109038.Text & "','" & t236109038.Text & "'," & Val(t336109038.Text) & "," & Val(t436109038.Text) & ")", conect)
conect.Open()
com.ExecuteNonQuery()
conect.Close()
com.Dispose()
t136109038.Text = ""
t236109038.Text = ""
t336109038.Text = ""
t436109038.Text = ""
LATIHAN032A36109038.Icha()
End Sub
End Class
Public Class LATIHAN032C36109038
BalasHapusDim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\DATABARANG.accdb;Jet OLEDB:Database Password=icha")
Dim cari As New ByIskandar.CariKeDataBaseByIskandar
Private Sub Button136109038_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button136109038.Click
If t136109038.Text.Length = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If t236109038.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(t336109038.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(t436109038.Text) = 0 Then
MsgBox("JUMLAH BELUM TERISI")
Exit Sub
End If
If KB36109038.Text <> t136109038.Text Then
cari.AturPencarianDataBase("barang", "kodebarang", t136109038.Text, 1, conect)
If cari.JumlanBaris > 0 Then
MsgBox("kode sudah ada")
Exit Sub
End If
End If
Dim com As New OleDb.OleDbCommand
com = New OleDb.OleDbCommand("update barang set kodebarang ='" & t136109038.Text & "',namabarang='" & t236109038.Text & "',hargajual=" & Val(t336109038.Text) & ", jumlahbarang=" & Val(t436109038.Text) & " where kodebarang='" & KB36109038.Text & "'", conect)
conect.Open()
com.ExecuteNonQuery()
conect.Close()
com.Dispose()
t136109038.Text = ""
t236109038.Text = ""
t336109038.Text = ""
t436109038.Text = ""
KB36109038.Text = "-"
LATIHAN032A36109038.Icha()
End Sub
End Class
Public Class Lat32A36109042
BalasHapusDim Connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\databarang.accdb; Jet OLEDB:Database Password=25")
Dim Ijal As New DataTable
Private Sub latihan153619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select * from barang", Connect)
cobaji.Fill(Ijal)
DataGridView1.DataSource = Ijal
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Lat32C36109042.Visible = False Then
Lat32C36109042.Show()
Else
Lat32C36109042.Activate()
End If
Lat32C36109042.ToolStripStatusLabel1.Text = DataGridView1.CurrentRow.Cells("KodeBarang").Value
Lat32C36109042.t136109042.Text = DataGridView1.CurrentRow.Cells("KodeBarang").Value
Lat32C36109042.t236109042.Text = DataGridView1.CurrentRow.Cells("NamaBarang").Value
Lat32C36109042.t336109042.Text = DataGridView1.CurrentRow.Cells("Hargajual").Value
Lat32C36109042.t436109042.Text = DataGridView1.CurrentRow.Cells("jumlahbarang").Value
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If Lat32B36109042.Visible = False Then
Lat32B36109042.Show()
Else
Lat32B36109042.Activate()
End If
End Sub
End Class
Public Class Lat32B36109042
BalasHapusDim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb; Jet OLEDB:Database Password=25")
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109042.Click
If Val(t136109042.Text) = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If t236109042.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(t336109042.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(t436109042.Text) = 0 Then
MsgBox("jumlah barang belum diisi")
Exit Sub
End If
Dim cm As New OleDb.OleDbCommand
cm = New OleDb.OleDbCommand("PsTambahBarang", conect)
cm.CommandType = CommandType.StoredProcedure
cm.Parameters.Add(New OleDb.OleDbParameter("pKodeBarang", t136109042.Text))
cm.Parameters.Add(New OleDb.OleDbParameter("pNamaBarang", t236109042.Text))
cm.Parameters.Add(New OleDb.OleDbParameter("pPersawal", Val(t336109042.Text)))
cm.Parameters.Add(New OleDb.OleDbParameter("pHargajual", Val(t436109042.Text)))
conect.Open()
cm.ExecuteNonQuery()
conect.Close()
cm.Dispose()
t136109042.Text = ""
t236109042.Text = ""
t336109042.Text = ""
t436109042.Text = ""
End Sub
End Class
Public Class Lat32C36109042
BalasHapusDim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb; Jet OLEDB:Database Password=25")
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109042.Click
If Val(t136109042.Text) = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If t236109042.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(t336109042.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(t436109042.Text) = 0 Then
MsgBox("jumlah barang belum diisi")
Exit Sub
End If
Dim com As New OleDb.OleDbCommand
com = New OleDb.OleDbCommand("UPDATE BARANG SET kodebarang = '" & t136109042.Text & "', namabarang = '" & t236109042.Text & "', hargajual = " & Val(t336109042.Text) & ", jumlahbarang = " & Val(t436109042.Text) & " where kodebarang ='" & ToolStripStatusLabel1.Text & "'", conect)
conect.Open()
com.ExecuteNonQuery()
conect.Close()
com.Dispose()
t136109042.Text = ""
t236109042.Text = ""
t336109042.Text = ""
t436109042.Text = ""
End Sub
End Class
Komentar ini telah dihapus oleh pengarang.
BalasHapusPublic Class LATIHAN032A36109032
BalasHapusDim 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 LATIHAN032A36109032_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim lanjutkan As New OleDb.OleDbDataAdapter
lanjutkan = New OleDb.OleDbDataAdapter("select * from barang", sambung)
lanjutkan.Fill(pusat)
DataGridView136109032.DataSource = pusat
End Sub
Private Sub Button136109032_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109032.Click
If LATIHAN032C36109032.Visible = False Then
LATIHAN032C36109032.Show()
Else
LATIHAN032C36109032.Activate()
End If
LATIHAN032C36109032.ToolStripStatusLabel1.Text = "kode barang lama= " & DataGridView136109032.CurrentRow.Cells("KodeBarang").Value
LATIHAN032C36109032.t1.Text = DataGridView136109032.CurrentRow.Cells("KodeBarang").Value
LATIHAN032C36109032.t2.Text = DataGridView136109032.CurrentRow.Cells("NamaBarang").Value
LATIHAN032C36109032.t3.Text = DataGridView136109032.CurrentRow.Cells("Hargajual").Value
LATIHAN032C36109032.t4.Text = DataGridView136109032.CurrentRow.Cells("jumlahbarang").Value
End Sub
Private Sub Button236109032_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button236109032.Click
If LATIHAN032B36109032.Visible = False Then
LATIHAN032B36109032.Show()
Else
LATIHAN032B36109032.Activate()
End If
End Sub
End Class
Public Class Latihan32A36109046
BalasHapusDim Jalan As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\DATABARANG.accdb;Jet OLEDB:Database Password=14322836")
Dim ambil As New DataTable
Public Sub ambildata()
Dim data As New OleDb.OleDbDataAdapter
data = New OleDb.OleDbDataAdapter("SELECT* FROM barang", Jalan)
ambil.Rows.Clear()
data.Fill(ambil)
data.Dispose()
End Sub
Private Sub Latihan32A36109046_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ambildata()
DataGridView136109046.DataSource = ambil
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Latihan31B36109046.Visible = False Then
Latihan31B36109046.Show()
Else
Latihan31B36109046.Activate()
End If
Latihan31B36109046.KB36109046.Text = DataGridView136109046.CurrentRow.Cells("KODEBARANG").Value
Latihan31B36109046.t136109046.Text = DataGridView136109046.CurrentRow.Cells("KODEBARANG").Value
Latihan31B36109046.t236109046.Text = DataGridView136109046.CurrentRow.Cells("NAMABARANG").Value
Latihan31B36109046.t336109046.Text = DataGridView136109046.CurrentRow.Cells("HARGAJUAL").Value
Latihan31B36109046.t436109046.Text = DataGridView136109046.CurrentRow.Cells("JUMLAHBARANG").Value
End Sub
End Class
Public Class Latihan32B36109046
Dim Jalan As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\DATABARANG.accdb;Jet OLEDB:Database Password=14322836")
Dim ambil As New DataTable
Public Sub ambildata()
Dim data As New OleDb.OleDbDataAdapter
data = New OleDb.OleDbDataAdapter("SELECT* FROM barang", Jalan)
ambil.Rows.Clear()
data.Fill(ambil)
data.Dispose()
End Sub
Private Sub Latihan31A36109046_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ambildata()
DataGridView136109046.DataSource = ambil
End Sub
Private Sub Button136109046_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109046.Click
If Latihan31B36109046.Visible = False Then
Latihan31B36109046.Show()
Else
Latihan31B36109046.Activate()
End If
Latihan31B36109046.KB36109046.Text = DataGridView136109046.CurrentRow.Cells("KODEBARANG").Value
Latihan31B36109046.t136109046.Text = DataGridView136109046.CurrentRow.Cells("KODEBARANG").Value
Latihan31B36109046.t236109046.Text = DataGridView136109046.CurrentRow.Cells("NAMABARANG").Value
Latihan31B36109046.t336109046.Text = DataGridView136109046.CurrentRow.Cells("HARGAJUAL").Value
Latihan31B36109046.t436109046.Text = DataGridView136109046.CurrentRow.Cells("JUMLAHBARANG").Value
End Sub
End Class
Public Class Latihan32C36109046
BalasHapusDim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=14322836")
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 BELUM TERISI")
Exit Sub
End If
If KB.Text <> t136109046.Text Then
cari.AturPencarianDataBase("barang", "kodebarang", t136109046.Text, 1, conect)
If cari.JumlanBaris > 0 Then
MsgBox("kode sudah ada")
Exit Sub
End If
End If
Dim com As New OleDb.OleDbCommand
com = New OleDb.OleDbCommand("update barang set kodebarang ='" & t136109046.Text & "',namabarang='" & t236109046.Text & "',hargajual=" & Val(t336109046.Text) & ", jumlahbarang=" & Val(t436109050.Text) & " where kodebarang='" & KB.Text & "'", conect)
conect.Open()
com.ExecuteNonQuery()
conect.Close()
com.Dispose()
t136109046.Text = ""
t236109046.Text = ""
t336109046.Text = ""
t436109046.Text = ""
KB.Text = "-"
Latihan32A36109046.zaza()
End Sub
End Class
Public Class LATIHAN032C36109032
BalasHapusDim sambung As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=jayapura")
Private Sub Button136109032_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109032.Click
If Val(T136109032.Text) = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If T236109032.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(T336109032.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(T436109032.Text) = 0 Then
MsgBox("jumlah barang belum diisi")
Exit Sub
End If
Dim com As New OleDb.OleDbCommand
com = New OleDb.OleDbCommand("UPDATE BARANG SET kodebarang = '" & T136109032.Text & "', namabarang = '" & T236109032.Text & "', hargajual = " & Val(T336109032.Text) & ", jumlahbarang = " & Val(T436109032.Text) & " where kodebarang ='" & ToolStripStatusLabel1.Text & "'", sambung)
sambung.Open()
com.ExecuteNonQuery()
sambung.Close()
com.Dispose()
T136109032.Text = ""
T236109032.Text = ""
T336109032.Text = ""
T436109032.Text = ""
End Sub
End Class
Public Class Latihan_32A36109055
BalasHapusDim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=25")
Dim tes As New DataTable
Public Sub falah()
Dim adap As New OleDb.OleDbDataAdapter
adap = New OleDb.OleDbDataAdapter("select * from barang", conect)
tes.Rows.Clear()
adap.Fill(tes)
adap.Dispose()
End Sub
Private Sub Latihan_32A36109055_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
falah()
DataGridView136109055.DataSource = tes
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If Latihan_32B36109055.Visible = False Then
Latihan_32B36109055.Show()
Else
Latihan_32B36109055.Activate()
End If
End Sub
End Class
Public Class Latihan_32B36109055
Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=25")
Dim cari As New ByIskandar.CariKeDataBaseByIskandar
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If t136109055.Text.Length = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If t236109055.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(t336109055.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(t436109055.Text) = 0 Then
MsgBox("jumlah barang")
Exit Sub
End If
cari.AturPencarianDataBase("barang", "kodebarang", t136109055.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('" & t136109055.Text & "','" & t236109055.Text & "'," & Val(t336109055.Text) & "," & Val(t436109055.Text) & ")", conect)
conect.Open()
com.ExecuteNonQuery()
conect.Close()
com.Dispose()
t136109055.Text = ""
t236109055.Text = ""
t336109055.Text = ""
t436109055.Text = ""
Latihan_32A36109055.falah()
End Sub
Private Sub Latihan_32B36109055_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Public Class LATIHAN032C012
BalasHapusDim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=25")
Dim coba As New ByIskandar.CariKeDataBaseByIskandar
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If t136109055.Text.Length = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If t236109055.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(t336109055.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(t436109055.Text) = 0 Then
MsgBox("JUMLAH BELUM TERISI")
Exit Sub
End If
If KB.Text <> t136109055.Text Then
coba.AturPencarianDataBase("barang", "kodebarang", t136109055.Text, 1, conect)
If coba.JumlanBaris > 0 Then
MsgBox("kode sudah ada")
Exit Sub
End If
End If
Dim com As New OleDb.OleDbCommand
com = New OleDb.OleDbCommand("update barang set kodebarang ='" & t136109055.Text & "',namabarang='" & t236109055.Text & "',hargajual=" & Val(t336109055.Text) & ", jumlahbarang=" & Val(t436109055.Text) & " where kodebarang='" & KB.Text & "'", conect)
conect.Open()
com.ExecuteNonQuery()
conect.Close()
com.Dispose()
t136109055.Text = ""
t236109055.Text = ""
t336109055.Text = ""
t436109055.Text = ""
KB.Text = "-"
Latihan_32A36109055.falah()
End Sub
Private Sub LATIHAN032C012_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Public Class Latih32C36109040
BalasHapusDim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;jet OLEDB:database password=150991")
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Val(t1.Text) = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If t2.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(t3.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(t4.Text) = 0 Then
MsgBox("jumlah barang belum diisi")
Exit Sub
End If
Dim com As New OleDb.OleDbCommand
com = New OleDb.OleDbCommand("UPDATE BARANG SET kodebarang = '" & t1.Text & "', namabarang = '" & t2.Text & "', hargajual = " & Val(t3.Text) & ", jumlahbarang = " & Val(t4.Text) & " where kodebarang ='" & ToolStripStatusLabel1.Text & "'", conect)
conect.Open()
com.ExecuteNonQuery()
conect.Close()
com.Dispose()
t1.Text = ""
t2.Text = ""
t3.Text = ""
t4.Text = ""
End Sub
End Class
Public Class LATIHAN032B36109030
BalasHapusDim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb; Jet OLEDB:Database Password=sanie")
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Val(t1.Text) = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If t2.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(t3.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(t4.Text) = 0 Then
MsgBox("jumlah barang belum diisi")
Exit Sub
End If
Dim cm As New OleDb.OleDbCommand
cm = New OleDb.OleDbCommand("PsTambahBarang", conect)
cm.CommandType = CommandType.StoredProcedure
cm.Parameters.Add(New OleDb.OleDbParameter("pKodeBarang", t1.Text))
cm.Parameters.Add(New OleDb.OleDbParameter("pNamaBarang", t2.Text))
cm.Parameters.Add(New OleDb.OleDbParameter("pPersawal", Val(t3.Text)))
cm.Parameters.Add(New OleDb.OleDbParameter("pHargajual", Val(t4.Text)))
conect.Open()
cm.ExecuteNonQuery()
conect.Close()
cm.Dispose()
t1.Text = ""
t2.Text = ""
t3.Text = ""
t4.Text = ""
End Sub
End Class
Public Class LATIHAN032C36109030
BalasHapusDim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb; Jet OLEDB:Database Password=sanie")
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Val(t1.Text) = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If t2.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(t3.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(t4.Text) = 0 Then
MsgBox("jumlah barang belum diisi")
Exit Sub
End If
Dim com As New OleDb.OleDbCommand
com = New OleDb.OleDbCommand("UPDATE BARANG SET kodebarang = '" & t1.Text & "', namabarang = '" & t2.Text & "', hargajual = " & Val(t3.Text) & ", jumlahbarang = " & Val(t4.Text) & " where kodebarang ='" & ToolStripStatusLabel1.Text & "'", conect)
conect.Open()
com.ExecuteNonQuery()
conect.Close()
com.Dispose()
t1.Text = ""
t2.Text = ""
t3.Text = ""
t4.Text = ""
End Sub
End Class
http://hilariusmariotonapa.blogspot.com/2012/10/prosedur-penyelesaian-latihan32a36110048_9.html
BalasHapushttp://hilariusmariotonapa.blogspot.com/2012/10/deskripsi-latihan32a36110048.html
http://hilariusmariotonapa.blogspot.com/2012/10/prosedur-penyelesaian-latihan32b36110048_6160.html
http://hilariusmariotonapa.blogspot.com/2012/10/deskripsi-latihan32b36110048.html
http://hilariusmariotonapa.blogspot.com/2012/10/prosedur-penyelesaian-latihan32c36110048.html
http://hilariusmariotonapa.blogspot.com/2012/10/deskripsi-latihan32c36110048.html
http://nurrahmahrasyid2.blogspot.com/2012/10/latihan32a36110042.html
BalasHapushttp://nurrahmahrasyid2.blogspot.com/2012/10/latihan32b36110042.html
http://nurrahmahrasyid2.blogspot.com/2012/10/latihan32c36110042.html
http://ilhaazzahra.blogspot.com/2012/10/latihan32a36110033.html
BalasHapushttp://ilhaazzahra.blogspot.com/2012/10/latihan32b36110033.html
http://ilhaazzahra.blogspot.com/2012/10/latihan32c36110033.html
http://rizka-azisah.blogspot.com/2012/10/deskripsi-penyelesaian_9233.html
BalasHapushttp://rizka-azisah.blogspot.com/2012/10/deskripsi-penyelesaian_1258.html
http://rizka-azisah.blogspot.com/2012/10/deskripsi-penyelesaian_2633.html
http://andiniwarakusuma.blogspot.com/2012/10/latihan32a36110034.html
BalasHapushttp://andiniwarakusuma.blogspot.com/2012/10/latihan32b36110034.html
http://andiniwarakusuma.blogspot.com/2012/10/latihan32c36110034.html
http://rahmisuryatama05.blogspot.com/2012/10/latihan32a36110040.html
BalasHapushttp://rahmisuryatama05.blogspot.com/2012/10/latihan32b36110040.html
http://rahmisuryatama05.blogspot.com/2012/10/latihan32c36110040.html
http://benhilll.blogspot.com/2012/10/deskripsi-dan-prosedur_7085.html
BalasHapushttp://benhilll.blogspot.com/2012/10/deskripsi-dan-prosedur_2753.html
http://benhilll.blogspot.com/2012/10/deskripsi-dan-prosedur_9283.html
http://audryasharii.blogspot.com/2012/10/latihan.html
BalasHapushttp://audryasharii.blogspot.com/2012/10/latihan32b36110031.html
http://audryasharii.blogspot.com/2012/10/latihan32c36110031.html
http://rosyanausman.blogspot.com/2012/10/latihan32a36110036.html
BalasHapushttp://rosyanausman.blogspot.com/2012/10/latihan32b36110036.html
http://rosyanausman.blogspot.com/2012/10/latihan32c36110036_13.html
http://rainaagrippinaa.blogspot.com/#!/2012/10/latihan32a36110032.html
BalasHapushttp://rainaagrippinaa.blogspot.com/#!/2012/10/latihan32b36110032.html
http://rainaagrippinaa.blogspot.com/#!/2012/10/latihan32c36110032.html
http://tiya-sri.blogspot.com/2012/10/latihan32a36110044-aplikasi-komputer-4.html
BalasHapushttp://tiya-sri.blogspot.com/2012/10/latihan32b36110044-aplikasi-komputer-4.html
http://tiya-sri.blogspot.com/2012/10/latihan32c36110044-aplikasi-komputer-4.html
http://reskypurwono.blogspot.com/2012/10/prosedur-penyelesaian-latihan32a36110037.html
BalasHapushttp://reskypurwono.blogspot.com/2012/10/prosedur-penyelesaian-latihan32b36110037.html
http://reskypurwono.blogspot.com/2012/10/prosedur-penyelesaian-latihan32c36110037.html
http://03melisa.blogspot.com/2012/10/latihan-32a-36110051-apkom-4-akuntansi.html
BalasHapushttp://03melisa.blogspot.com/2012/10/latihan-32b-36110051-apkom-4-akuntansi.html
http://03melisa.blogspot.com/2012/10/latihan-32c-36110051-apkom-4-akuntansi.html
http://sriayu-36110030.blogspot.com/2012/10/diskripsi-prosedur-latihan-32-a.html
BalasHapushttp://sriayu-36110030.blogspot.com/2012/10/diskripsi-prosedur-latihan-32-b.html
http://sriayu-36110030.blogspot.com/2012/10/diskripsi-prosedur-latihan-32-c.html
http://burhankhang58.blogspot.com/2012/10/latihan32a36110047.html
BalasHapushttp://burhankhang58.blogspot.com/2012/10/latihan32b36110047.html
http://burhankhang58.blogspot.com/2012/10/latihan32c36110047.html
http://masnurselayar.blogspot.com/2012/10/latihan-32a36110055.html
BalasHapushttp://masnurselayar.blogspot.com/2012/10/latihan-32b36110055.html
http://masnurselayar.blogspot.com/2012/10/latihan-32c36110055.html
http://eminaomi.blogspot.com/2012/10/latihan32a36110049.html
BalasHapushttp://eminaomi.blogspot.com/2012/10/latihan32b36110049.html
http://eminaomi.blogspot.com/2012/10/latihan32c36110049.html
http://dewiwahyuni91.blogspot.com/2012/10/latihan32a36110038_5196.html
BalasHapushttp://dewiwahyuni91.blogspot.com/2012/10/latihan32b36110038_11.html
http://dewiwahyuni91.blogspot.com/2012/10/latihan32c36110038_11.html
http://hasfiahzain.blogspot.com/2012/10/latihan32a36110052.html
BalasHapushttp://hasfiahzain.blogspot.com/2012/10/latihan32b36110052.html
http://hasfiahzain.blogspot.com/2012/10/latihan32c36110052.html
http://ias-anakbola.blogspot.com/2012/10/latihan32a36110056.html
BalasHapushttp://ias-anakbola.blogspot.com/2012/10/latihan32b36110056.html
http://ias-anakbola.blogspot.com/2012/10/latihan32c36110056.html
http://nurhanalott.blogspot.com/2012/10/latihan32a36110029.html
BalasHapushttp://nurhanalott.blogspot.com/2012/10/latihan32b36110029.html
http://nurhanalott.blogspot.com/2012/10/latihan32c36110029.html
http://zulkiflitryputra.blogspot.com/2012/10/latihan32a36110046.html
BalasHapushttp://zulkiflitryputra.blogspot.com/2012/10/latihan32b36110046.html
http://zulkiflitryputra.blogspot.com/2012/10/latihan32c36110046.html
http://sukadriady.blogspot.com/2012/10/latihan32a36110043.html
BalasHapushttp://sukadriady.blogspot.com/2012/10/latihan32b36110043.html
http://sukadriady.blogspot.com/2012/10/latihan32c36110043.html
http://ruslancullank1.blogspot.com/2012/10/deskripsilatihan32a36110054.html
BalasHapushttp://ruslancullank1.blogspot.com/2012/10/deskripsilatihan32b36110054.html
http://ruslancullank1.blogspot.com/2012/10/deskripsilatihan32c36110054.html