Public Class latihan_23a_008 Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tabel As New DataTable
Private Sub latihan_23a_008_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 mastertransaksi", koneksi) tabel.Rows.Clear() adapter.Fill(tabel) adapter.Dispose()
DGV64109008.DataSource = tabel
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button46109008.Click If latihan_23b_008.Visible = False Then latihan_23b_008.Show() Else : latihan_23b_008.Activate() End If
Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DGV64109008.CellContentClick
End Sub End Class
Public Class latihan_23b_008 Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tabel As New DataTable
Public Sub uly(ByVal A As String) Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select*from detailtransaksi where notrans='" & A & "'", koneksi) tabel.Rows.Clear() adapter.Fill(tabel)
DataGridView1.DataSource = tabel
End Sub
Private Sub latihan_23b_008_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick
Public Class latihan_24a_008 Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tabel As New DataTable
Private Sub latihan_23a_008_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 inner join detailtransaksi on barang.kodebarang = detailtransaksi.kodebarang", koneksi) tabel.Rows.Clear() adapter.Fill(tabel) adapter.Dispose()
DataGridView1.DataSource = tabel End Sub Private Sub button1_click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If latihan_24b_008.visible = False Then latihan_24b_008.Show() Else : latihan_24b_008.Activate() End If
latihan_24b_008.uly(latihan_24b_008.KB46109008.Text) End Sub
Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick
End Sub End Class
Public Class latihan_24b_008 Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tabel As New DataTable
Public Sub uly(ByVal a As String) Dim adapter As New oledb.oledbdataadapter adapter = New oledb.oledbdataadapter("select*from barang inner join detailtransaksi on barang.kodebarang = detailtransaksi.kodebarang='" & a & "'", koneksi) tabel.rows.clear() adapter.fill(tabel) adapter.dispose()
DGV46109008.datasource = tabel End Sub
Private Sub latihan_24b_008_load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub End Class
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim datatable As New DataTable Private Sub latihan_25a_008_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim shoell As New OleDb.OleDbDataAdapter shoell = New OleDb.OleDbDataAdapter("select*from barang", conect) datatable.Rows.Clear() shoell.Fill(datatable) shoell.Dispose()
DGV46109008.DataSource = datatable
End Sub
Private Sub Button46109008_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button46109008.Click If latihan_25b_008.Visible = False Then latihan_25b_008.Show() Else : latihan_25b_008.Activate() End If
latihan_25b_008.uly(latihan_25b_008.KB46109008.Text) End Sub End Class
Public Class latihan_25b_008 Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tabel As New DataTable
Public Sub uly(ByVal A As String) Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select*from detailtransaksi where kodebarang='" & A & "'", koneksi) tabel.Rows.Clear() adapter.Fill(tabel)
DGV46109008.DataSource = tabel End Sub
Private Sub latihan_25b_008_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Public Class latihan_26a_008 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim data As New DataTable Private Sub latihan_26a_008_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", conect) data.Rows.Clear() adapter.Fill(data) adapter.Dispose()
DGV46109008.DataSource = data
End Sub
Private Sub Button46109008_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button46109008.Click If latihan_26b_008.Visible = False Then latihan_26b_008.Show() Else : latihan_26b_008.Activate() End If
latihan_26b_008.uly(latihan_26b_008.KB46109008.Text) End Sub End Class
Public Class latihan_26b_008 Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim meong As New DataTable
Public Sub uly(ByVal A As String) Dim adapter As New OleDb.OleDbDataAdapter Dim shoell As String shoell = "SELECT MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, MASTERTRANSAKSI.KETERANGAN, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, [DETAILTRANSAKSI]![UNIT]*[DETAILTRANSAKSI]![HARGA] AS JUMLAH FROM DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS = MASTERTRANSAKSI.NOTRANS WHERE KODEBARANG = '" & A & "'" adapter = New OleDb.OleDbDataAdapter(shoell, koneksi) adapter.Fill(meong)
Dim izhar As Integer = 0 Dim sul As Integer = 0 For Each row As DataRow In meong.Rows izhar += row("Unit") sul += row("Jumlah") Next TU46109008.Text = izhar TJ46109008.Text = sul
End Sub
Private Sub latihan_26b_008_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load DGV46109008.DataSource = meong End Sub End Class
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim nia As New DataTable Private Sub KLIK051_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KLIK051.Click If LATIHAN23B_46109051.Visible = False Then LATIHAN23B_46109051.Show() Else : LATIHAN23B_46109051.Activate() End If
End Sub Private Sub LATIHAN23A_46109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim wahda As New OleDb.OleDbDataAdapter wahda = New OleDb.OleDbDataAdapter("select*from mastertransaksi", conect) nia.Rows.Clear() wahda.Fill(nia) wahda.Dispose()
DG_051.DataSource = nia
End Sub End Class
Public Class LATIHAN23B_46109051 Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim wahda As New DataTable
Public Sub uly(ByVal A As String) Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select*from detailtransaksi where notrans='" & A & "'", koneksi) wahda.Rows.Clear() adapter.Fill(wahda)
Public Class LATIHAN26A_46109051 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim WAHDA As New DataTable Private Sub latihan_26a_001_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim NIA As New OleDb.OleDbDataAdapter NIA = New OleDb.OleDbDataAdapter("select*from barang", conect) WAHDA.Rows.Clear() NIA.Fill(WAHDA) NIA.Dispose()
DG_051.DataSource = WAHDA
End Sub Private Sub BT_051_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT_051.Click If LATIHAN26B_46109051.Visible = False Then LATIHAN26B_46109051.Show() Else : LATIHAN26B_46109051.Activate() End If
LATIHAN26B_46109051.uly(LATIHAN26B_46109051.TB1_051.Text) End Sub
End Class
Public Class LATIHAN26B_46109051
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim WAHDANIAH As New DataTable
Public Sub uly(ByVal A As String) Dim WAHDA As New OleDb.OleDbDataAdapter Dim NIA As String NIA = "SELECT MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, MASTERTRANSAKSI.KETERANGAN, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, [DETAILTRANSAKSI]![UNIT]*[DETAILTRANSAKSI]![HARGA] AS JUMLAH FROM DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS = MASTERTRANSAKSI.NOTRANS WHERE KODEBARANG = '" & A & "'" WAHDA = New OleDb.OleDbDataAdapter(NIA, koneksi) WAHDA.Fill(WAHDANIAH)
Dim NIA1 As Integer = 0 Dim NIA2 As Integer = 0 For Each NIA3 As DataRow In WAHDANIAH.Rows NIA1 += NIA3("Unit") NIA2 += NIA3("Jumlah")
Next TU_051.Text = NIA1 TJ_051.Text = NIA2
End Sub
Private Sub LATIHAN26B_46109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load DG_051.DataSource = WAHDANIAH End Sub End Class
Public Class LATIHAN26A_46109051 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim WAHDA As New DataTable Private Sub latihan_26a_001_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim NIA As New OleDb.OleDbDataAdapter NIA = New OleDb.OleDbDataAdapter("select*from barang", conect) WAHDA.Rows.Clear() NIA.Fill(WAHDA) NIA.Dispose()
DG_051.DataSource = WAHDA
End Sub Private Sub BT_051_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT_051.Click If LATIHAN26B_46109051.Visible = False Then LATIHAN26B_46109051.Show() Else : LATIHAN26B_46109051.Activate() End If
LATIHAN26B_46109051.uly(LATIHAN26B_46109051.TB1_051.Text) End Sub
End Class
Public Class LATIHAN26B_46109051
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim WAHDANIAH As New DataTable
Public Sub uly(ByVal A As String) Dim WAHDA As New OleDb.OleDbDataAdapter Dim NIA As String NIA = "SELECT MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, MASTERTRANSAKSI.KETERANGAN, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, [DETAILTRANSAKSI]![UNIT]*[DETAILTRANSAKSI]![HARGA] AS JUMLAH FROM DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS = MASTERTRANSAKSI.NOTRANS WHERE KODEBARANG = '" & A & "'" WAHDA = New OleDb.OleDbDataAdapter(NIA, koneksi) WAHDA.Fill(WAHDANIAH)
Dim NIA1 As Integer = 0 Dim NIA2 As Integer = 0 For Each NIA3 As DataRow In WAHDANIAH.Rows NIA1 += NIA3("Unit") NIA2 += NIA3("Jumlah")
Next TU_051.Text = NIA1 TJ_051.Text = NIA2
End Sub
Private Sub LATIHAN26B_46109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load DG_051.DataSource = WAHDANIAH End Sub End Class
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim AYU As New DataTable
Private Sub Latihan23A_46109017_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim WANDIKA As New OleDb.OleDbDataAdapter WANDIKA = New OleDb.OleDbDataAdapter("select*from mastertransaksi", koneksi) AYU.Rows.Clear() WANDIKA.Fill(AYU) WANDIKA.Dispose()
data46109017.DataSource = AYU
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Latihan23B_46109017.Visible = False Then Latihan23B_46109017.Show() Else : Latihan23B_46109017.Activate() End If
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim AYU As New DataTable
Public Sub PUTRI(ByVal A As String) Dim WANDIKA As New OleDb.OleDbDataAdapter WANDIKA = New OleDb.OleDbDataAdapter("select*from detailtransaksi where notrans='" & A & "'", koneksi) AYU.Rows.Clear() WANDIKA.Fill(AYU)
data46109017.DataSource = AYU
End Sub
Private Sub Latihan23B_46109017_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub End Class
Public Class Latihan24A_46109017 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim AYU As New DataTable Dim baris As DataRow
Private Sub Latihan24A_46109017_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobacoba As New OleDb.OleDbDataAdapter cobacoba = New OleDb.OleDbDataAdapter("select * from BARANG", CONECT) cobacoba.Fill(AYU) DataGridView1.DataSource = AYU End Sub
Private Sub button46109017_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button46109017.Click If Latihan24B_46109017.Visible = False Then Latihan24B_46109017.Show() Else Latihan24B_46109017.Activate() End If baris = AYU.DefaultView(BindingContext(AYU).Position).Row Latihan24B_46109017.TB1_46109017.Text = baris("KODEBARANG") Latihan24B_46109017.TB2_46109017.Text = baris("NAMABARANG") Latihan24B_46109017.TB3_46109017.Text = baris("HARGAJUAL") Latihan24B_46109017.TB4_46109017.Text = baris("PERSEDIAANAWAL") Latihan24B_46109017.AmbilData() End Sub End Class
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim testessaja As New DataTable Dim cobacoba As New OleDb.OleDbDataAdapter Public Sub AmbilData() cobacoba = New OleDb.OleDbDataAdapter("select * from DETAILTRANSAKSI where KODEBARANG ='" & TB1_46109017.Text & "'", CONECT) cobacoba.Fill(testessaja) End Sub
Private Sub Latihan24B_46109017_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DataGridView1.DataSource = testessaja End Sub End Class
Public Class Latihan25A_46109017
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim AYU As New DataTable Dim baris As DataRow Dim cobacoba As New OleDb.OleDbDataAdapter
Private Sub Latihan25A_46109017_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load cobacoba = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang ", CONECT) cobacoba.Fill(AYU) DataGridView1.DataSource = AYU End Sub
Private Sub Button46109017_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button46109017.Click If Latihan25B_46109017.Visible = False Then Latihan25B_46109017.Show() Else Latihan25B_46109017.Activate() End If baris = AYU.DefaultView(BindingContext(AYU).Position).Row Latihan25B_46109017.TB1_46109017.Text = baris("KODEBARANG") Latihan25B_46109017.TB2_46109017.Text = baris("NAMABARANG") Latihan25B_46109017.TB3_46109017.Text = baris("HARGAJUAL") Latihan25B_46109017.TB4_46109017.Text = baris("PERSEDIAANAWAL") Latihan25B_46109017.AmbilData() End Sub End Class
Public Class Latihan25B_46109017
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim testessaja As New DataTable Dim cobacoba As New OleDb.OleDbDataAdapter Public Sub AmbilData() cobacoba = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TB1_46109017.Text & "'", CONECT) cobacoba.Fill(testessaja) End Sub
Private Sub Latihan25B_46109017_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DataGridView1.DataSource = testessaja End Sub End Class
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim AYU As New DataTable Dim baris As DataRow Dim cobacoba As New OleDb.OleDbDataAdapter Private Sub Latihan26A_46109017_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load cobacoba = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang", CONECT) cobacoba.Fill(AYU) DataGridView1.DataSource = AYU End Sub Private Sub button146109017_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button146109017.Click If Latihan26B_46109017.Visible = False Then Latihan26B_46109017.Show() Else Latihan26B_46109017.Activate() End If baris = AYU.DefaultView(BindingContext(AYU).Position).Row Latihan26B_46109017.TB1_46109017.Text = baris("KODEBARANG") Latihan26B_46109017.TB2_46109017.Text = baris("NAMABARANG") Latihan26B_46109017.TB3_46109017.Text = baris("HARGAJUAL") Latihan26B_46109017.TB4_46109017.Text = baris("PERSEDIAANAWAL") Latihan26B_46109017.AmbilData() End Sub End Class
Public Class Latihan26B_46109017 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim testessaja As New DataTable Dim cobacoba As New OleDb.OleDbDataAdapter Public Sub AmbilData() cobacoba = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA,(DETAILTRANSAKSI.UNIT * DETAILTRANSAKSI.HARGA)as Jumlah from DETAILTRANSAKSI where KODEBARANG ='" & TB1_46109017.Text & "'", CONECT) cobacoba.Fill(testessaja) Dim tu, total As Integer For Each x As DataRow In testessaja.Rows tu = tu + x("UNIT") total = total + x("HARGA") Next TB5_46109017.Text = tu TB6_46109017.Text = total End Sub Private Sub LATIHAN026B012_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DataGridView1.DataSource = testessaja End Sub End Class
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim dede As New DataTable Private Sub kkk_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kkk.Click If latihan_23b_045.Visible = False Then latihan_23b_045.Show() Else : latihan_23b_045.Activate() End If
latihan_23b_045.uly(latihan_23b_045.aaa.Text) End Sub Private Sub latihan_23a_045_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim ikha As New OleDb.OleDbDataAdapter ikha = New OleDb.OleDbDataAdapter("select*from mastertransaksi", conect) dede.Rows.Clear() ikha.Fill(dede) ikha.Dispose()
dd1.DataSource = dede
End Sub End Class
Public Class latihan_23b_045 Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tabel As New DataTable
Public Sub uly(ByVal A As String) Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select*from detailtransaksi where notrans='" & A & "'", koneksi) tabel.Rows.Clear() adapter.Fill(tabel)
dd2.DataSource = tabel
End Sub
Private Sub latihan_23b_045_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim dede As New DataTable Private Sub latihan_24a_045_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim ikha1 As New OleDb.OleDbDataAdapter ikha1 = New OleDb.OleDbDataAdapter("select*from barang", conect) dede.Rows.Clear() ikha1.Fill(dede) ikha1.Dispose()
dd1.DataSource = dede
End Sub Private Sub dt46109045_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dd1.Click If latihan_24b_045.Visible = False Then latihan_24b_045.Show() Else : latihan_24b_045.Activate() End If
latihan_24b_045.uly(latihan_24b_045.aaa.Text) End Sub End Class
Public Class latihan_24b_045
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tabel As New DataTable
Public Sub uly(ByVal A As String) Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select*from detailtransaksi where kodebarang='" & A & "'", koneksi) tabel.Rows.Clear() adapter.Fill(tabel)
dd2.DataSource = tabel
End Sub
Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
Public Class latihan_25a_045 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim dede As New DataTable Private Sub latihan_25a_045_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim ikha1 As New OleDb.OleDbDataAdapter ikha1 = New OleDb.OleDbDataAdapter("select*from barang", conect) dede.Rows.Clear() ikha1.Fill(dede) ikha1.Dispose()
dd1.DataSource = ikha1
End Sub Private Sub dt46109001_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dd1.Click If latihan_25b_045.Visible = False Then latihan_25b_045.Show() Else : latihan_25b_045.Activate() End If
Public Class latihan_25b_045 Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tabel As New DataTable
Public Sub uly(ByVal A As String) Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select*from detailtransaksi where kodebarang='" & A & "'", koneksi) tabel.Rows.Clear() adapter.Fill(tabel)
dd2.DataSource = tabel End Sub
Private Sub latihan_25b_045_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Public Class latihan_26a_045 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim dede As New DataTable Private Sub latihan_26a_0456_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim ikha1 As New OleDb.OleDbDataAdapter ikha1 = New OleDb.OleDbDataAdapter("select*from barang", conect) dede.Rows.Clear() ikha1.Fill(dede) ikha1.Dispose()
dd1.DataSource = dede
End Sub Private Sub dt46109001_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dd1.Click If latihan_26b_045.Visible = False Then latihan_26b_045.Show() Else : latihan_26b_045.Activate() End If
latihan_26b_045.uly(latihan_26b_045.aaa.Text) End Sub End Class
Public Class latihan_26b_045 Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tabel As New DataTable
Public Sub uly(ByVal A As String) Dim aa45 As New OleDb.OleDbDataAdapter Dim bb45 As String bb45 = "SELECT MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, MASTERTRANSAKSI.KETERANGAN, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, [DETAILTRANSAKSI]![UNIT]*[DETAILTRANSAKSI]![HARGA] AS JUMLAH FROM DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS = MASTERTRANSAKSI.NOTRANS WHERE KODEBARANG = '" & A & "'" aa45 = New OleDb.OleDbDataAdapter(bb45, koneksi) aa45.Fill(tabel)
Dim ikha1 As Integer = 0 Dim ikha2 As Integer = 0 For Each ikha3 As DataRow In tabel.Rows ikha1 += ikha3("Unit") ikha2 += ikha3("Jumlah") Next aaa.Text = ikha1 bbb.Text = ikha2
End Sub
Private Sub latihan_26b_045_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load dd1.DataSource = tabel End Sub End Class
Public Class LATIHAN026B053 Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tabel As New DataTable
Public Sub uly(ByVal SAENONG As String) Dim INDAH As New OleDb.OleDbDataAdapter Dim YANI As String YANI = "SELECT MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, MASTERTRANSAKSI.KETERANGAN, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, [DETAILTRANSAKSI]![UNIT]*[DETAILTRANSAKSI]![HARGA] AS JUMLAH FROM DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS = MASTERTRANSAKSI.NOTRANS WHERE KODEBARANG = '" & SAENONG & "'" INDAH = New OleDb.OleDbDataAdapter(YANI, koneksi) INDAH.Fill(tabel)
Dim SAE1 As Integer = 0 Dim SAE2 As Integer = 0 For Each SAE3 As DataRow In tabel.Rows SAE1 += SAE3("Unit") SAE2 += SAE3("Jumlah") Next TOTUNIT_053.Text = SAE1 TOTJUM_053.Text = SAE2
End Sub
Private Sub LATIHAN026B053_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load DGV_053.DataSource = tabel End Sub End Class
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim arul As New DataTable Dim baris As DataRow Dim tes As New OleDb.OleDbDataAdapter
Private Sub Latihan25A_46109005_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load tes = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang ", CONECT) tes.Fill(arul) d46109005.DataSource = arul End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If LATIHAN025B012.Visible = False Then LATIHAN025B012.Show() Else LATIHAN025B012.Activate() End If baris = arul.DefaultView(BindingContext(arul).Position).Row LATIHAN025B012.kb46109005.Text = baris("KODEBARANG") LATIHAN025B012.nb46109005.Text = baris("NAMABARANG") LATIHAN025B012.hj46109005.Text = baris("HARGAJUAL") LATIHAN025B012.jb46109005.Text = baris("PERSEDIAANAWAL") LATIHAN025B012.uly() End Sub End Class Public Class LATIHAN025B012 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tabel As New DataTable Dim tes As New OleDb.OleDbDataAdapter
Public Sub uly() tes = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & kb46109005.Text & "'", CONECT) tes.Fill(tabel) End Sub
Private Sub k46109005_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles k46109005.CellContentClick
End Sub
Private Sub LATIHAN025B012_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load uly() k46109005.DataSource = tabel End Sub End Class
muh. fahrul Public Class LATIHAN026A012 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim arul As New DataTable Dim baris As DataRow Dim tes As New OleDb.OleDbDataAdapter
Private Sub LATIHAN026A012_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load tes = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang ", CONECT) tes.Fill(arul) DataGridView1.DataSource = arul End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If LATIHAN026B012.Visible = False Then LATIHAN026B012.Show() Else LATIHAN026B012.Activate() End If baris = arul.DefaultView(BindingContext(arul).Position).Row LATIHAN026B012.tb1_46109005.Text = baris("KODEBARANG") LATIHAN026B012.tb2_46109005.Text = baris("NAMABARANG") LATIHAN026B012.tb3_46109005.Text = baris("HARGAJUAL") LATIHAN026B012.tb4_46109005.Text = baris("PERSEDIAANAWAL") LATIHAN026B012.uly() End Sub End Class Public Class LATIHAN026B012 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tabel As New DataTable Dim tes As New OleDb.OleDbDataAdapter Public Sub uly() tes = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & tb1_46109005.Text & "'", CONECT) tes.Fill(tabel) Dim tu, total As Integer For Each x As DataRow In tabel.Rows tu = tu + x("UNIT") total = total + x("HARGA") Next TB5_46109005.Text = tu TB6_46109005.Text = total End Sub
Private Sub LATIHAN026B012_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load uly() DataGridView1.DataSource = tabel End Sub
Public Class latihan_23a_009 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim faisal As New DataTable Private Sub k46109009_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles k46109009.Click If latihan_23b_009.Visible = False Then latihan_23b_009.Show() Else : latihan_23b_009.Activate() End If latihan_23b_009.n46109009.Text = dgv_46109009.CurrentRow.Cells("notrans").Value latihan_23b_009.t46109009.Value = dgv_46109009.CurrentRow.Cells("tanggaltransaksi").Value latihan_23b_009.j46109009.Text = dgv_46109009.CurrentRow.Cells("jenistransaksi").Value latihan_23b_009.BM(latihan_23b_009.n46109009.Text) End Sub Private Sub latihan_23a_009_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim ichal1 As New OleDb.OleDbDataAdapter ichal1 = New OleDb.OleDbDataAdapter("select*from mastertransaksi", conect) faisal.Rows.Clear() ichal1.Fill(faisal) ichal1.Dispose() dgv_46109009.DataSource = faisal End Sub End Class
Public Class latihan_23b_009 Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tabel As New DataTable Public Sub BM(ByVal A As String) Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select*from detailtransaksi where notrans='" & A & "'", koneksi) tabel.Rows.Clear() adapter.Fill(tabel) dgv_46109009.DataSource = tabel End Sub End Class
Public Class latihan_24a_026 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim faisal As New DataTable Private Sub latihan_24a_009_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim ichal1 As New OleDb.OleDbDataAdapter ichal1 = New OleDb.OleDbDataAdapter("select*from barang", conect) faisal.Rows.Clear() ichal1.Fill(faisal) ichal1.Dispose()
dgv_46109009.DataSource = faisal End Sub Private Sub dt46109009_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dt46109009.Click If latihan_24b_009.Visible = False Then latihan_24b_009.Show() Else : latihan_24b_009.Activate() End If latihan_24b_009.kb46109009.Text = dgv_46109009.CurrentRow.Cells("kodebarang").Value latihan_24b_009.nb46109009.Text = dgv_46109009.CurrentRow.Cells("namabarang").Value latihan_24b_009.hj46109009.Text = dgv_46109009.CurrentRow.Cells("hargajual").Value latihan_24b_009.jb46109009.Text = dgv_46109009.CurrentRow.Cells("persediaanawal").Value latihan_24b_009.BM(latihan_24b_009.kb46109009.Text) End Sub End Class
Public Class latihan_24b_009 Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tabel As New DataTable Public Sub BM(ByVal A As String) Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select*from detailtransaksi where kodebarang='" & A & "'", koneksi) tabel.Rows.Clear() adapter.Fill(tabel)
Public Class latihan_25a_009 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim faisal As New DataTable Private Sub latihan_25a_009_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim ichal1 As New OleDb.OleDbDataAdapter ichal1 = New OleDb.OleDbDataAdapter("select*from barang", conect) faisal.Rows.Clear() ichal1.Fill(faisal) ichal1.Dispose() dgv_46109009.DataSource = faisal End Sub Private Sub dt46109009_Click(ByVal sender As system.Object, ByVal e As System.EventArgs) Handles dt46109009.Click If latihan_25b_009.Visible = False Then latihan_25b_009.Show() Else : latihan_25b_009.Activate() End If latihan_25b_009.kb46109009.Text = dgv_46109009.CurrentRow.Cells("kodebarang").Value latihan_25b_009.nb46109009.Text = dgv_46109009.CurrentRow.Cells("namabarang").Value latihan_25b_009.hj46109009.Text = dgv_46109009.CurrentRow.Cells("hargajual").Value latihan_25b_009.jb46109009.Text = dgv_46109009.CurrentRow.Cells("persediaanawal").Value latihan_25b_009.BM(latihan_25b_009.kb46109009.Text) End Sub End Class
Public Class latihan_25b_009 Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tabel As New DataTable Public Sub BM(ByVal A As String) Dim adapter As New OleDb.OleDbDataAdapter adapter = New oleDb.OleDbDataAdapter("select*from detailtransaksi where kodebarang='" & A & "'", koneksi) tabel.Rows.Clear() adapter.Fill(tabel) dgv_46109009.DataSource = tabel End Sub End Class
Public Class latihan_26a_009 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim faisal As New DataTable Private Sub latihan_26a_009_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim ichal1 As New OleDb.OleDbDataAdapter ichal1 = New OleDb.OleDbDataAdapter("select*from barang", conect) faisal.Rows.Clear() ichal1.Fill(faisal) ichal1.Dispose() dgv_46109009.DataSource = faisal End Sub Private Sub dt46109009_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dt46109009.Click If latihan_26b_009.Visible = False Then latihan_26b_009.Show() Else : latihan_26b_009.Activate() End If latihan_26b_009.kb46109009.Text = dgv_46109009.CurrentRow.Cells("kodebarang").Value latihan_26b_009.nb46109009.Text = dgv_46109009.CurrentRow.Cells("namabarang").Value latihan_26b_009.hj46109009.Text = dgv_46109009.CurrentRow.Cells("hargajual").Value latihan_26b_009.jb46109009.Text = dgv_46109009.CurrentRow.Cells("persediaanawal").Value latihan_26b_009.BM(latihan_26b_009.kb46109009.Text) End Sub End Class
Public Class latihan_26b_009 Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tabel As New DataTable Public Sub BM(ByVal A As String) Dim ting As New OleDb.OleDbDataAdapter Dim tong As String tong = "SELECT MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, MASTERTRANSAKSI.KETERANGAN, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, [DETAILTRANSAKSI]![UNIT]*[DETAILTRANSAKSI]![HARGA] AS JUMLAH FROM DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS = MASTERTRANSAKSI.NOTRANS WHERE KODEBARANG = '" & A & "'" ting = New OleDb.OleDbDataAdapter(tong, koneksi) ting.Fill(tabel) Dim ichal1 As Integer = 0 Dim ichal2 As Integer = 0 For Each ichal3 As DataRow In tabel.Rows ichal1 += ichal3("Unit") ichal2 += ichal3("Jumlah") Next tu46109009.Text = ichal1 tj46109009.Text = ichal2 End Sub Private Sub latihan_26b_009_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load dgv_46109009.DataSource = tabel End Sub End Class
Public Class latihan_25a_026 Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tabel As New DataTable
Private Sub Latihan_25a_026_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", koneksi) tabel.Rows.Clear() adapter.Fill(tabel) adapter.Dispose()
data_46109040.DataSource = tabel
End Sub
Private Sub detail_46109040_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles detail_46109040.Click If latihan_25b_026.Visible = False Then latihan_25b_026.Show() Else : latihan_25b_026.Activate() End If
Public Class latihan_25b_026 Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tabel As New DataTable
Public Sub ukky_46109040(ByVal U As String) Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, mastertransaksi.keterangan, detailtransaksi.unit, detailtransaksi.harga, detailtransaksi.unit * detailtransaksi.harga as jumlah from mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans where kodebarang='" & U & "'", koneksi) tabel.Rows.Clear() adapter.Fill(tabel)
Public Class latihan_26a_026 Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tabel As New DataTable
Private Sub Latihan_26a_026_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", koneksi) tabel.Rows.Clear() adapter.Fill(tabel) adapter.Dispose()
data_46109040.DataSource = tabel
End Sub
Private Sub detail_46109040_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles detail_46109040.Click If latihan_26b_026.Visible = False Then latihan_26b_026.Show() Else : latihan_26b_026.Activate() End If
Public Class latihan_26b_026 Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tabel As New DataTable
Public Sub ukky_46109040(ByVal U As String) Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, mastertransaksi.keterangan, detailtransaksi.unit, detailtransaksi.harga, detailtransaksi.unit * detailtransaksi.harga as jumlah from mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans where kodebarang='" & U & "'", koneksi) tabel.Rows.Clear() adapter.Fill(tabel)
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim yuni As New DataTable
Private Sub data_023_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles data_023.CellContentClick
End Sub
Private Sub Form23A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim ismi As New OleDb.OleDbDataAdapter ismi = New OleDb.OleDbDataAdapter("select*from mastertransaksi", koneksi) yuni.Rows.Clear() ismi.Fill(yuni) ismi.Dispose()
data_023.DataSource = yuni
End Sub
Private Sub Klik_023_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Klik_023.Click If Form23b.Visible = False Then Form23b.Show() Else : Form23b.Activate()
End If Form23b.TextBox1.Text = data_023.CurrentRow.Cells("notrans").Value Form23b.DateTimePicker1.Value = data_023.CurrentRow.Cells("tanggaltransaksi").Value Form23b.TextBox2.Text = data_023.CurrentRow.Cells("jenistransaksi").Value
Form23b.cimi(Form23b.TextBox1.Text) End Sub End Class
Public Class Form23b Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim yuni As New DataTable Public Sub cimi(ByVal a As String) Dim ismi As New OleDb.OleDbDataAdapter ismi = New OleDb.OleDbDataAdapter("select*from detailtransaksi where notrans='" & a & "'", koneksi) yuni.Rows.Clear() ismi.Fill(yuni)
Public Class Form24A Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim yuni As New DataTable
Private Sub Form23c_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim ismi As New OleDb.OleDbDataAdapter ismi = New OleDb.OleDbDataAdapter("select*from barang", koneksi) yuni.Rows.Clear() ismi.Fill(yuni) ismi.Dispose()
D_46109023.DataSource = yuni
End Sub
Private Sub DT_46109023_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DT_46109023.Click If Form24b.Visible = False Then Form24b.Show() Else : Form24b.Activate() End If
Public Class Form24b Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim yuni As New DataTable Public Sub cimi(ByVal a As String) Dim ismi As New OleDb.OleDbDataAdapter ismi = New OleDb.OleDbDataAdapter("select*from detailtransaksi where kodebarang='" & a & "'", koneksi) yuni.Rows.Clear() ismi.Fill(yuni) ismi.Dispose()
Public Class Form25a Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim yuni As New DataTable
Private Sub Form25a_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim ismi As New OleDb.OleDbDataAdapter ismi = New OleDb.OleDbDataAdapter("select*from barang", koneksi) yuni.Rows.Clear() ismi.Fill(yuni) ismi.Dispose()
Data_46109023.DataSource = yuni
End Sub
Private Sub DT_46109023_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DT_46109023.Click If Form25b.Visible = False Then Form25b.Show() Else : Form25b.Activate() End If
Public Class Form25b Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim yuni As New DataTable Public Sub cimi(ByVal a As String) Dim ismi As New OleDb.OleDbDataAdapter ismi = New OleDb.OleDbDataAdapter("select*from detailtransaksi where kodebarang='" & a & "'", koneksi) yuni.Rows.Clear() ismi.Fill(yuni)
Public Class Form26a Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim yuni As New DataTable
Private Sub Form26a_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim ismi As New OleDb.OleDbDataAdapter ismi = New OleDb.OleDbDataAdapter("select*from barang", koneksi) yuni.Rows.Clear() ismi.Fill(yuni) ismi.Dispose()
Data_46109023.DataSource = yuni
End Sub
Private Sub dt_46109023_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dt_46109023.Click If Form26b.Visible = False Then Form26b.Show() Else : Form26b.Activate() End If
Public Class Form26b Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim yuni As New DataTable Public Sub cimi(ByVal A As String) Dim cimi1 As New OleDb.OleDbDataAdapter Dim cimi2 As String cimi2 = "SELECT MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, MASTERTRANSAKSI.KETERANGAN, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, [DETAILTRANSAKSI]![UNIT]*[DETAILTRANSAKSI]![HARGA] AS JUMLAH FROM DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS = MASTERTRANSAKSI.NOTRANS WHERE KODEBARANG = '" & A & "'" cimi1 = New OleDb.OleDbDataAdapter(cimi2, koneksi) cimi1.Fill(yuni)
Dim as1 As Integer = 0 Dim as2 As Integer = 0 For Each as3 As DataRow In yuni.Rows as1 += as3("Unit") as2 += as3("Jumlah") Next Tot_unit.Text = as1 Tot_jum.Text = as2
sulkifli herman
BalasHapus46109008
Public Class latihan_23a_008
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tabel As New DataTable
Private Sub latihan_23a_008_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 mastertransaksi", koneksi)
tabel.Rows.Clear()
adapter.Fill(tabel)
adapter.Dispose()
DGV64109008.DataSource = tabel
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button46109008.Click
If latihan_23b_008.Visible = False Then
latihan_23b_008.Show()
Else : latihan_23b_008.Activate()
End If
latihan_23b_008.No46109008.Text = DGV64109008.CurrentRow.Cells("notrans").Value
latihan_23b_008.Date46109008.Value = DGV64109008.CurrentRow.Cells("tanggaltransaksi").Value
latihan_23b_008.Jenis46109008.Text = DGV64109008.CurrentRow.Cells("jenistransaksi").Value
latihan_23b_008.uly(latihan_23b_008.No46109008.Text)
End Sub
Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DGV64109008.CellContentClick
End Sub
End Class
Public Class latihan_23b_008
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tabel As New DataTable
Public Sub uly(ByVal A As String)
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select*from detailtransaksi where notrans='" & A & "'", koneksi)
tabel.Rows.Clear()
adapter.Fill(tabel)
DataGridView1.DataSource = tabel
End Sub
Private Sub latihan_23b_008_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick
End Sub
End Class
sulkifli herman
BalasHapus46109008
Public Class latihan_24a_008
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tabel As New DataTable
Private Sub latihan_23a_008_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 inner join detailtransaksi on barang.kodebarang = detailtransaksi.kodebarang", koneksi)
tabel.Rows.Clear()
adapter.Fill(tabel)
adapter.Dispose()
DataGridView1.DataSource = tabel
End Sub
Private Sub button1_click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If latihan_24b_008.visible = False Then
latihan_24b_008.Show()
Else : latihan_24b_008.Activate()
End If
latihan_24b_008.KB46109008.text = DataGridView1.CurrentRow.Cells("barang.kodebarang").Value
latihan_24b_008.NB46109008.text = DataGridView1.CurrentRow.Cells("namabarang").Value
latihan_24b_008.HJ46109008.Text = DataGridView1.CurrentRow.Cells("harga").Value
latihan_24b_008.JB46109008.text = DataGridView1.CurrentRow.Cells("unit").Value
latihan_24b_008.uly(latihan_24b_008.KB46109008.Text)
End Sub
Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick
End Sub
End Class
Public Class latihan_24b_008
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tabel As New DataTable
Public Sub uly(ByVal a As String)
Dim adapter As New oledb.oledbdataadapter
adapter = New oledb.oledbdataadapter("select*from barang inner join detailtransaksi on barang.kodebarang = detailtransaksi.kodebarang='" & a & "'", koneksi)
tabel.rows.clear()
adapter.fill(tabel)
adapter.dispose()
DGV46109008.datasource = tabel
End Sub
Private Sub latihan_24b_008_load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
sulkifli herman
BalasHapus46109008
Public Class latihan_25a_008
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim datatable As New DataTable
Private Sub latihan_25a_008_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim shoell As New OleDb.OleDbDataAdapter
shoell = New OleDb.OleDbDataAdapter("select*from barang", conect)
datatable.Rows.Clear()
shoell.Fill(datatable)
shoell.Dispose()
DGV46109008.DataSource = datatable
End Sub
Private Sub Button46109008_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button46109008.Click
If latihan_25b_008.Visible = False Then
latihan_25b_008.Show()
Else : latihan_25b_008.Activate()
End If
latihan_25b_008.KB46109008.Text = DGV46109008.CurrentRow.Cells("kodebarang").Value
latihan_25b_008.NB46109008.Text = DGV46109008.CurrentRow.Cells("namabarang").Value
latihan_25b_008.HJ46109008.Text = DGV46109008.CurrentRow.Cells("hargajual").Value
latihan_25b_008.JB46109008.Text = DGV46109008.CurrentRow.Cells("persediaanawal").Value
latihan_25b_008.uly(latihan_25b_008.KB46109008.Text)
End Sub
End Class
Public Class latihan_25b_008
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tabel As New DataTable
Public Sub uly(ByVal A As String)
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select*from detailtransaksi where kodebarang='" & A & "'", koneksi)
tabel.Rows.Clear()
adapter.Fill(tabel)
DGV46109008.DataSource = tabel
End Sub
Private Sub latihan_25b_008_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Komentar ini telah dihapus oleh pengarang.
BalasHapussulkifli herman
BalasHapus46109008
Public Class latihan_26a_008
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim data As New DataTable
Private Sub latihan_26a_008_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", conect)
data.Rows.Clear()
adapter.Fill(data)
adapter.Dispose()
DGV46109008.DataSource = data
End Sub
Private Sub Button46109008_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button46109008.Click
If latihan_26b_008.Visible = False Then
latihan_26b_008.Show()
Else : latihan_26b_008.Activate()
End If
latihan_26b_008.KB46109008.Text = DGV46109008.CurrentRow.Cells("kodebarang").Value
latihan_26b_008.NB46109008.Text = DGV46109008.CurrentRow.Cells("namabarang").Value
latihan_26b_008.HJ46109008.Text = DGV46109008.CurrentRow.Cells("hargajual").Value
latihan_26b_008.JB46109008.Text = DGV46109008.CurrentRow.Cells("persediaanawal").Value
latihan_26b_008.uly(latihan_26b_008.KB46109008.Text)
End Sub
End Class
Public Class latihan_26b_008
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim meong As New DataTable
Public Sub uly(ByVal A As String)
Dim adapter As New OleDb.OleDbDataAdapter
Dim shoell As String
shoell = "SELECT MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, MASTERTRANSAKSI.KETERANGAN, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, [DETAILTRANSAKSI]![UNIT]*[DETAILTRANSAKSI]![HARGA] AS JUMLAH FROM DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS = MASTERTRANSAKSI.NOTRANS WHERE KODEBARANG = '" & A & "'"
adapter = New OleDb.OleDbDataAdapter(shoell, koneksi)
adapter.Fill(meong)
Dim izhar As Integer = 0
Dim sul As Integer = 0
For Each row As DataRow In meong.Rows
izhar += row("Unit")
sul += row("Jumlah")
Next
TU46109008.Text = izhar
TJ46109008.Text = sul
End Sub
Private Sub latihan_26b_008_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
DGV46109008.DataSource = meong
End Sub
End Class
WAHDANIAH
BalasHapus46109051
Public Class LATIHAN23A_46109051
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim nia As New DataTable
Private Sub KLIK051_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KLIK051.Click
If LATIHAN23B_46109051.Visible = False Then
LATIHAN23B_46109051.Show()
Else : LATIHAN23B_46109051.Activate()
End If
LATIHAN23B_46109051.TB1_051.Text = DG_051.CurrentRow.Cells("notrans").Value
LATIHAN23B_46109051.DT_051.Value = DG_051.CurrentRow.Cells("tanggaltransaksi").Value
LATIHAN23B_46109051.TB2_051.Text = DG_051.CurrentRow.Cells("jenistransaksi").Value
LATIHAN23B_46109051.uly(LATIHAN23B_46109051.TB1_051.Text)
End Sub
Private Sub LATIHAN23A_46109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim wahda As New OleDb.OleDbDataAdapter
wahda = New OleDb.OleDbDataAdapter("select*from mastertransaksi", conect)
nia.Rows.Clear()
wahda.Fill(nia)
wahda.Dispose()
DG_051.DataSource = nia
End Sub
End Class
Public Class LATIHAN23B_46109051
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim wahda As New DataTable
Public Sub uly(ByVal A As String)
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select*from detailtransaksi where notrans='" & A & "'", koneksi)
wahda.Rows.Clear()
adapter.Fill(wahda)
DG_051.DataSource = wahda
End Sub
End Class
WAHDANIAH
BalasHapus46109051
Public Class LATIHAN26A_46109051
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim WAHDA As New DataTable
Private Sub latihan_26a_001_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim NIA As New OleDb.OleDbDataAdapter
NIA = New OleDb.OleDbDataAdapter("select*from barang", conect)
WAHDA.Rows.Clear()
NIA.Fill(WAHDA)
NIA.Dispose()
DG_051.DataSource = WAHDA
End Sub
Private Sub BT_051_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT_051.Click
If LATIHAN26B_46109051.Visible = False Then
LATIHAN26B_46109051.Show()
Else : LATIHAN26B_46109051.Activate()
End If
LATIHAN26B_46109051.TB1_051.Text = DG_051.CurrentRow.Cells("kodebarang").Value
LATIHAN26B_46109051.TB2_051.Text = DG_051.CurrentRow.Cells("namabarang").Value
LATIHAN26B_46109051.TB3_051.Text = DG_051.CurrentRow.Cells("hargajual").Value
LATIHAN26B_46109051.TB4_051.Text = DG_051.CurrentRow.Cells("persediaanawal").Value
LATIHAN26B_46109051.uly(LATIHAN26B_46109051.TB1_051.Text)
End Sub
End Class
Public Class LATIHAN26B_46109051
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim WAHDANIAH As New DataTable
Public Sub uly(ByVal A As String)
Dim WAHDA As New OleDb.OleDbDataAdapter
Dim NIA As String
NIA = "SELECT MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, MASTERTRANSAKSI.KETERANGAN, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, [DETAILTRANSAKSI]![UNIT]*[DETAILTRANSAKSI]![HARGA] AS JUMLAH FROM DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS = MASTERTRANSAKSI.NOTRANS WHERE KODEBARANG = '" & A & "'"
WAHDA = New OleDb.OleDbDataAdapter(NIA, koneksi)
WAHDA.Fill(WAHDANIAH)
Dim NIA1 As Integer = 0
Dim NIA2 As Integer = 0
For Each NIA3 As DataRow In WAHDANIAH.Rows
NIA1 += NIA3("Unit")
NIA2 += NIA3("Jumlah")
Next
TU_051.Text = NIA1
TJ_051.Text = NIA2
End Sub
Private Sub LATIHAN26B_46109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
DG_051.DataSource = WAHDANIAH
End Sub
End Class
WAHDANIAH
BalasHapus46109051
Public Class LATIHAN26A_46109051
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim WAHDA As New DataTable
Private Sub latihan_26a_001_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim NIA As New OleDb.OleDbDataAdapter
NIA = New OleDb.OleDbDataAdapter("select*from barang", conect)
WAHDA.Rows.Clear()
NIA.Fill(WAHDA)
NIA.Dispose()
DG_051.DataSource = WAHDA
End Sub
Private Sub BT_051_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT_051.Click
If LATIHAN26B_46109051.Visible = False Then
LATIHAN26B_46109051.Show()
Else : LATIHAN26B_46109051.Activate()
End If
LATIHAN26B_46109051.TB1_051.Text = DG_051.CurrentRow.Cells("kodebarang").Value
LATIHAN26B_46109051.TB2_051.Text = DG_051.CurrentRow.Cells("namabarang").Value
LATIHAN26B_46109051.TB3_051.Text = DG_051.CurrentRow.Cells("hargajual").Value
LATIHAN26B_46109051.TB4_051.Text = DG_051.CurrentRow.Cells("persediaanawal").Value
LATIHAN26B_46109051.uly(LATIHAN26B_46109051.TB1_051.Text)
End Sub
End Class
Public Class LATIHAN26B_46109051
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim WAHDANIAH As New DataTable
Public Sub uly(ByVal A As String)
Dim WAHDA As New OleDb.OleDbDataAdapter
Dim NIA As String
NIA = "SELECT MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, MASTERTRANSAKSI.KETERANGAN, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, [DETAILTRANSAKSI]![UNIT]*[DETAILTRANSAKSI]![HARGA] AS JUMLAH FROM DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS = MASTERTRANSAKSI.NOTRANS WHERE KODEBARANG = '" & A & "'"
WAHDA = New OleDb.OleDbDataAdapter(NIA, koneksi)
WAHDA.Fill(WAHDANIAH)
Dim NIA1 As Integer = 0
Dim NIA2 As Integer = 0
For Each NIA3 As DataRow In WAHDANIAH.Rows
NIA1 += NIA3("Unit")
NIA2 += NIA3("Jumlah")
Next
TU_051.Text = NIA1
TJ_051.Text = NIA2
End Sub
Private Sub LATIHAN26B_46109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
DG_051.DataSource = WAHDANIAH
End Sub
End Class
AYU WANDIKA
BalasHapus46109017
Public Class Latihan23A_46109017
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim AYU As New DataTable
Private Sub Latihan23A_46109017_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim WANDIKA As New OleDb.OleDbDataAdapter
WANDIKA = New OleDb.OleDbDataAdapter("select*from mastertransaksi", koneksi)
AYU.Rows.Clear()
WANDIKA.Fill(AYU)
WANDIKA.Dispose()
data46109017.DataSource = AYU
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Latihan23B_46109017.Visible = False Then
Latihan23B_46109017.Show()
Else : Latihan23B_46109017.Activate()
End If
Latihan23B_46109017.NOMOR_46109017.Text = data46109017.CurrentRow.Cells("notrans").Value
Latihan23B_46109017.TANGGAL_46109017.Value = data46109017.CurrentRow.Cells("tanggaltransaksi").Value
Latihan23B_46109017.JENIS_46109017.Text = data46109017.CurrentRow.Cells("jenistransaksi").Value
Latihan23B_46109017.PUTRI(Latihan23B_46109017.NOMOR_46109017.Text)
End Sub
End Class
Public Class Latihan23B_46109017
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim AYU As New DataTable
Public Sub PUTRI(ByVal A As String)
Dim WANDIKA As New OleDb.OleDbDataAdapter
WANDIKA = New OleDb.OleDbDataAdapter("select*from detailtransaksi where notrans='" & A & "'", koneksi)
AYU.Rows.Clear()
WANDIKA.Fill(AYU)
data46109017.DataSource = AYU
End Sub
Private Sub Latihan23B_46109017_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Public Class Latihan24A_46109017
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim AYU As New DataTable
Dim baris As DataRow
Private Sub Latihan24A_46109017_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobacoba As New OleDb.OleDbDataAdapter
cobacoba = New OleDb.OleDbDataAdapter("select * from BARANG", CONECT)
cobacoba.Fill(AYU)
DataGridView1.DataSource = AYU
End Sub
Private Sub button46109017_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button46109017.Click
If Latihan24B_46109017.Visible = False Then
Latihan24B_46109017.Show()
Else
Latihan24B_46109017.Activate()
End If
baris = AYU.DefaultView(BindingContext(AYU).Position).Row
Latihan24B_46109017.TB1_46109017.Text = baris("KODEBARANG")
Latihan24B_46109017.TB2_46109017.Text = baris("NAMABARANG")
Latihan24B_46109017.TB3_46109017.Text = baris("HARGAJUAL")
Latihan24B_46109017.TB4_46109017.Text = baris("PERSEDIAANAWAL")
Latihan24B_46109017.AmbilData()
End Sub
End Class
Public Class Latihan24B_46109017
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim testessaja As New DataTable
Dim cobacoba As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
cobacoba = New OleDb.OleDbDataAdapter("select * from DETAILTRANSAKSI where KODEBARANG ='" & TB1_46109017.Text & "'", CONECT)
cobacoba.Fill(testessaja)
End Sub
Private Sub Latihan24B_46109017_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DataGridView1.DataSource = testessaja
End Sub
End Class
Public Class Latihan25A_46109017
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim AYU As New DataTable
Dim baris As DataRow
Dim cobacoba As New OleDb.OleDbDataAdapter
Private Sub Latihan25A_46109017_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
cobacoba = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang ", CONECT)
cobacoba.Fill(AYU)
DataGridView1.DataSource = AYU
End Sub
Private Sub Button46109017_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button46109017.Click
If Latihan25B_46109017.Visible = False Then
Latihan25B_46109017.Show()
Else
Latihan25B_46109017.Activate()
End If
baris = AYU.DefaultView(BindingContext(AYU).Position).Row
Latihan25B_46109017.TB1_46109017.Text = baris("KODEBARANG")
Latihan25B_46109017.TB2_46109017.Text = baris("NAMABARANG")
Latihan25B_46109017.TB3_46109017.Text = baris("HARGAJUAL")
Latihan25B_46109017.TB4_46109017.Text = baris("PERSEDIAANAWAL")
Latihan25B_46109017.AmbilData()
End Sub
End Class
Public Class Latihan25B_46109017
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim testessaja As New DataTable
Dim cobacoba As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
cobacoba = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TB1_46109017.Text & "'", CONECT)
cobacoba.Fill(testessaja)
End Sub
Private Sub Latihan25B_46109017_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DataGridView1.DataSource = testessaja
End Sub
End Class
Public Class Latihan26A_46109017
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim AYU As New DataTable
Dim baris As DataRow
Dim cobacoba As New OleDb.OleDbDataAdapter
Private Sub Latihan26A_46109017_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
cobacoba = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang", CONECT)
cobacoba.Fill(AYU)
DataGridView1.DataSource = AYU
End Sub
Private Sub button146109017_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button146109017.Click
If Latihan26B_46109017.Visible = False Then
Latihan26B_46109017.Show()
Else
Latihan26B_46109017.Activate()
End If
baris = AYU.DefaultView(BindingContext(AYU).Position).Row
Latihan26B_46109017.TB1_46109017.Text = baris("KODEBARANG")
Latihan26B_46109017.TB2_46109017.Text = baris("NAMABARANG")
Latihan26B_46109017.TB3_46109017.Text = baris("HARGAJUAL")
Latihan26B_46109017.TB4_46109017.Text = baris("PERSEDIAANAWAL")
Latihan26B_46109017.AmbilData()
End Sub
End Class
Public Class Latihan26B_46109017
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim testessaja As New DataTable
Dim cobacoba As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
cobacoba = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA,(DETAILTRANSAKSI.UNIT * DETAILTRANSAKSI.HARGA)as Jumlah from DETAILTRANSAKSI where KODEBARANG ='" & TB1_46109017.Text & "'", CONECT)
cobacoba.Fill(testessaja)
Dim tu, total As Integer
For Each x As DataRow In testessaja.Rows
tu = tu + x("UNIT")
total = total + x("HARGA")
Next
TB5_46109017.Text = tu
TB6_46109017.Text = total
End Sub
Private Sub LATIHAN026B012_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DataGridView1.DataSource = testessaja
End Sub
End Class
Dewi Sartika
BalasHapus461 09 045
Public Class latihan_23a_045
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim dede As New DataTable
Private Sub kkk_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kkk.Click
If latihan_23b_045.Visible = False Then
latihan_23b_045.Show()
Else : latihan_23b_045.Activate()
End If
latihan_23b_045.aaa.Text = dd1.CurrentRow.Cells("notrans").Value
latihan_23b_045.bbb.Value = dd1.CurrentRow.Cells("tanggaltransaksi").Value
latihan_23b_045.ccc.Text = dd1.CurrentRow.Cells("jenistransaksi").Value
latihan_23b_045.uly(latihan_23b_045.aaa.Text)
End Sub
Private Sub latihan_23a_045_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ikha As New OleDb.OleDbDataAdapter
ikha = New OleDb.OleDbDataAdapter("select*from mastertransaksi", conect)
dede.Rows.Clear()
ikha.Fill(dede)
ikha.Dispose()
dd1.DataSource = dede
End Sub
End Class
Public Class latihan_23b_045
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tabel As New DataTable
Public Sub uly(ByVal A As String)
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select*from detailtransaksi where notrans='" & A & "'", koneksi)
tabel.Rows.Clear()
adapter.Fill(tabel)
dd2.DataSource = tabel
End Sub
Private Sub latihan_23b_045_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
dewi sartika
BalasHapus461 09 045
Public Class latihan_24a_045
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim dede As New DataTable
Private Sub latihan_24a_045_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ikha1 As New OleDb.OleDbDataAdapter
ikha1 = New OleDb.OleDbDataAdapter("select*from barang", conect)
dede.Rows.Clear()
ikha1.Fill(dede)
ikha1.Dispose()
dd1.DataSource = dede
End Sub
Private Sub dt46109045_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dd1.Click
If latihan_24b_045.Visible = False Then
latihan_24b_045.Show()
Else : latihan_24b_045.Activate()
End If
latihan_24b_045.aaa.Text = dd1.CurrentRow.Cells("kodebarang").Value
latihan_24b_045.bbb.Text = dd1.CurrentRow.Cells("namabarang").Value
latihan_24b_045.ccc.Text = dd1.CurrentRow.Cells("hargajual").Value
latihan_24b_045.ddd.Text = dd1.CurrentRow.Cells("persediaanawal").Value
latihan_24b_045.uly(latihan_24b_045.aaa.Text)
End Sub
End Class
Public Class latihan_24b_045
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tabel As New DataTable
Public Sub uly(ByVal A As String)
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select*from detailtransaksi where kodebarang='" & A & "'", koneksi)
tabel.Rows.Clear()
adapter.Fill(tabel)
dd2.DataSource = tabel
End Sub
Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
End Sub
End Class
dewi sartika
BalasHapus461 09 045
Public Class latihan_25a_045
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim dede As New DataTable
Private Sub latihan_25a_045_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ikha1 As New OleDb.OleDbDataAdapter
ikha1 = New OleDb.OleDbDataAdapter("select*from barang", conect)
dede.Rows.Clear()
ikha1.Fill(dede)
ikha1.Dispose()
dd1.DataSource = ikha1
End Sub
Private Sub dt46109001_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dd1.Click
If latihan_25b_045.Visible = False Then
latihan_25b_045.Show()
Else : latihan_25b_045.Activate()
End If
latihan_25b_045.aaa.Text = dd1.CurrentRow.Cells("kodebarang").Value
latihan_25b_045.bbb.Text = dd1.CurrentRow.Cells("namabarang").Value
latihan_25b_045.ccc.Text = dd1.CurrentRow.Cells("hargajual").Value
latihan_25b_045.ddd.Text = dd1.CurrentRow.Cells("persediaanawal").Value
latihan_25b_045.uly(latihan_25b_045.aaa.Text)
End Sub
End Class
Public Class latihan_25b_045
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tabel As New DataTable
Public Sub uly(ByVal A As String)
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select*from detailtransaksi where kodebarang='" & A & "'", koneksi)
tabel.Rows.Clear()
adapter.Fill(tabel)
dd2.DataSource = tabel
End Sub
Private Sub latihan_25b_045_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
dewi sartika
BalasHapus461 09 045
Public Class latihan_26a_045
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim dede As New DataTable
Private Sub latihan_26a_0456_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ikha1 As New OleDb.OleDbDataAdapter
ikha1 = New OleDb.OleDbDataAdapter("select*from barang", conect)
dede.Rows.Clear()
ikha1.Fill(dede)
ikha1.Dispose()
dd1.DataSource = dede
End Sub
Private Sub dt46109001_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dd1.Click
If latihan_26b_045.Visible = False Then
latihan_26b_045.Show()
Else : latihan_26b_045.Activate()
End If
latihan_26b_045.aaa.Text = dd1.CurrentRow.Cells("kodebarang").Value
latihan_26b_045.bbb.Text = dd1.CurrentRow.Cells("namabarang").Value
latihan_26b_045.ccc.Text = dd1.CurrentRow.Cells("hargajual").Value
latihan_26b_045.ddd.Text = dd1.CurrentRow.Cells("persediaanawal").Value
latihan_26b_045.uly(latihan_26b_045.aaa.Text)
End Sub
End Class
Public Class latihan_26b_045
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tabel As New DataTable
Public Sub uly(ByVal A As String)
Dim aa45 As New OleDb.OleDbDataAdapter
Dim bb45 As String
bb45 = "SELECT MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, MASTERTRANSAKSI.KETERANGAN, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, [DETAILTRANSAKSI]![UNIT]*[DETAILTRANSAKSI]![HARGA] AS JUMLAH FROM DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS = MASTERTRANSAKSI.NOTRANS WHERE KODEBARANG = '" & A & "'"
aa45 = New OleDb.OleDbDataAdapter(bb45, koneksi)
aa45.Fill(tabel)
Dim ikha1 As Integer = 0
Dim ikha2 As Integer = 0
For Each ikha3 As DataRow In tabel.Rows
ikha1 += ikha3("Unit")
ikha2 += ikha3("Jumlah")
Next
aaa.Text = ikha1
bbb.Text = ikha2
End Sub
Private Sub latihan_26b_045_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
dd1.DataSource = tabel
End Sub
End Class
Public Class LATIHAN026B053
BalasHapusDim koneksi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tabel As New DataTable
Public Sub uly(ByVal SAENONG As String)
Dim INDAH As New OleDb.OleDbDataAdapter
Dim YANI As String
YANI = "SELECT MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, MASTERTRANSAKSI.KETERANGAN, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, [DETAILTRANSAKSI]![UNIT]*[DETAILTRANSAKSI]![HARGA] AS JUMLAH FROM DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS = MASTERTRANSAKSI.NOTRANS WHERE KODEBARANG = '" & SAENONG & "'"
INDAH = New OleDb.OleDbDataAdapter(YANI, koneksi)
INDAH.Fill(tabel)
Dim SAE1 As Integer = 0
Dim SAE2 As Integer = 0
For Each SAE3 As DataRow In tabel.Rows
SAE1 += SAE3("Unit")
SAE2 += SAE3("Jumlah")
Next
TOTUNIT_053.Text = SAE1
TOTJUM_053.Text = SAE2
End Sub
Private Sub LATIHAN026B053_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
DGV_053.DataSource = tabel
End Sub
End Class
muh. fahrul
BalasHapusPublic Class Latihan25A_46109005
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim arul As New DataTable
Dim baris As DataRow
Dim tes As New OleDb.OleDbDataAdapter
Private Sub Latihan25A_46109005_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
tes = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang ", CONECT)
tes.Fill(arul)
d46109005.DataSource = arul
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If LATIHAN025B012.Visible = False Then
LATIHAN025B012.Show()
Else
LATIHAN025B012.Activate()
End If
baris = arul.DefaultView(BindingContext(arul).Position).Row
LATIHAN025B012.kb46109005.Text = baris("KODEBARANG")
LATIHAN025B012.nb46109005.Text = baris("NAMABARANG")
LATIHAN025B012.hj46109005.Text = baris("HARGAJUAL")
LATIHAN025B012.jb46109005.Text = baris("PERSEDIAANAWAL")
LATIHAN025B012.uly()
End Sub
End Class
Public Class LATIHAN025B012
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tabel As New DataTable
Dim tes As New OleDb.OleDbDataAdapter
Public Sub uly()
tes = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & kb46109005.Text & "'", CONECT)
tes.Fill(tabel)
End Sub
Private Sub k46109005_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles k46109005.CellContentClick
End Sub
Private Sub LATIHAN025B012_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
uly()
k46109005.DataSource = tabel
End Sub
End Class
muh. fahrul
BalasHapusPublic Class LATIHAN026A012
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim arul As New DataTable
Dim baris As DataRow
Dim tes As New OleDb.OleDbDataAdapter
Private Sub LATIHAN026A012_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
tes = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang ", CONECT)
tes.Fill(arul)
DataGridView1.DataSource = arul
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If LATIHAN026B012.Visible = False Then
LATIHAN026B012.Show()
Else
LATIHAN026B012.Activate()
End If
baris = arul.DefaultView(BindingContext(arul).Position).Row
LATIHAN026B012.tb1_46109005.Text = baris("KODEBARANG")
LATIHAN026B012.tb2_46109005.Text = baris("NAMABARANG")
LATIHAN026B012.tb3_46109005.Text = baris("HARGAJUAL")
LATIHAN026B012.tb4_46109005.Text = baris("PERSEDIAANAWAL")
LATIHAN026B012.uly()
End Sub
End Class
Public Class LATIHAN026B012
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tabel As New DataTable
Dim tes As New OleDb.OleDbDataAdapter
Public Sub uly()
tes = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & tb1_46109005.Text & "'", CONECT)
tes.Fill(tabel)
Dim tu, total As Integer
For Each x As DataRow In tabel.Rows
tu = tu + x("UNIT")
total = total + x("HARGA")
Next
TB5_46109005.Text = tu
TB6_46109005.Text = total
End Sub
Private Sub LATIHAN026B012_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
uly()
DataGridView1.DataSource = tabel
End Sub
Public Class latihan_23a_009
BalasHapusDim conect As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim faisal As New DataTable
Private Sub k46109009_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles k46109009.Click
If latihan_23b_009.Visible = False Then
latihan_23b_009.Show()
Else : latihan_23b_009.Activate()
End If
latihan_23b_009.n46109009.Text = dgv_46109009.CurrentRow.Cells("notrans").Value
latihan_23b_009.t46109009.Value = dgv_46109009.CurrentRow.Cells("tanggaltransaksi").Value
latihan_23b_009.j46109009.Text = dgv_46109009.CurrentRow.Cells("jenistransaksi").Value
latihan_23b_009.BM(latihan_23b_009.n46109009.Text)
End Sub
Private Sub latihan_23a_009_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ichal1 As New OleDb.OleDbDataAdapter
ichal1 = New OleDb.OleDbDataAdapter("select*from mastertransaksi", conect)
faisal.Rows.Clear()
ichal1.Fill(faisal)
ichal1.Dispose()
dgv_46109009.DataSource = faisal
End Sub
End Class
Public Class latihan_23b_009
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tabel As New DataTable
Public Sub BM(ByVal A As String)
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select*from detailtransaksi where notrans='" & A & "'", koneksi)
tabel.Rows.Clear()
adapter.Fill(tabel)
dgv_46109009.DataSource = tabel
End Sub
End Class
Public Class latihan_24a_026
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim faisal As New DataTable
Private Sub latihan_24a_009_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ichal1 As New OleDb.OleDbDataAdapter
ichal1 = New OleDb.OleDbDataAdapter("select*from barang", conect)
faisal.Rows.Clear()
ichal1.Fill(faisal)
ichal1.Dispose()
dgv_46109009.DataSource = faisal
End Sub
Private Sub dt46109009_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dt46109009.Click
If latihan_24b_009.Visible = False Then
latihan_24b_009.Show()
Else : latihan_24b_009.Activate()
End If
latihan_24b_009.kb46109009.Text = dgv_46109009.CurrentRow.Cells("kodebarang").Value
latihan_24b_009.nb46109009.Text = dgv_46109009.CurrentRow.Cells("namabarang").Value
latihan_24b_009.hj46109009.Text = dgv_46109009.CurrentRow.Cells("hargajual").Value
latihan_24b_009.jb46109009.Text = dgv_46109009.CurrentRow.Cells("persediaanawal").Value
latihan_24b_009.BM(latihan_24b_009.kb46109009.Text)
End Sub
End Class
Public Class latihan_24b_009
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tabel As New DataTable
Public Sub BM(ByVal A As String)
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select*from detailtransaksi where kodebarang='" & A & "'", koneksi)
tabel.Rows.Clear()
adapter.Fill(tabel)
dgv_46109009.DataSource = tabel
End Sub
End Class
Public Class latihan_25a_009
BalasHapusDim conect As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim faisal As New DataTable
Private Sub latihan_25a_009_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ichal1 As New OleDb.OleDbDataAdapter
ichal1 = New OleDb.OleDbDataAdapter("select*from barang", conect)
faisal.Rows.Clear()
ichal1.Fill(faisal)
ichal1.Dispose()
dgv_46109009.DataSource = faisal
End Sub
Private Sub dt46109009_Click(ByVal sender As system.Object, ByVal e As System.EventArgs) Handles dt46109009.Click
If latihan_25b_009.Visible = False Then
latihan_25b_009.Show()
Else : latihan_25b_009.Activate()
End If
latihan_25b_009.kb46109009.Text = dgv_46109009.CurrentRow.Cells("kodebarang").Value
latihan_25b_009.nb46109009.Text = dgv_46109009.CurrentRow.Cells("namabarang").Value
latihan_25b_009.hj46109009.Text = dgv_46109009.CurrentRow.Cells("hargajual").Value
latihan_25b_009.jb46109009.Text = dgv_46109009.CurrentRow.Cells("persediaanawal").Value
latihan_25b_009.BM(latihan_25b_009.kb46109009.Text)
End Sub
End Class
Public Class latihan_25b_009
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tabel As New DataTable
Public Sub BM(ByVal A As String)
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New oleDb.OleDbDataAdapter("select*from detailtransaksi where kodebarang='" & A & "'", koneksi)
tabel.Rows.Clear()
adapter.Fill(tabel)
dgv_46109009.DataSource = tabel
End Sub
End Class
Public Class latihan_26a_009
BalasHapusDim conect As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim faisal As New DataTable
Private Sub latihan_26a_009_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ichal1 As New OleDb.OleDbDataAdapter
ichal1 = New OleDb.OleDbDataAdapter("select*from barang", conect)
faisal.Rows.Clear()
ichal1.Fill(faisal)
ichal1.Dispose()
dgv_46109009.DataSource = faisal
End Sub
Private Sub dt46109009_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dt46109009.Click
If latihan_26b_009.Visible = False Then
latihan_26b_009.Show()
Else : latihan_26b_009.Activate()
End If
latihan_26b_009.kb46109009.Text = dgv_46109009.CurrentRow.Cells("kodebarang").Value
latihan_26b_009.nb46109009.Text = dgv_46109009.CurrentRow.Cells("namabarang").Value
latihan_26b_009.hj46109009.Text = dgv_46109009.CurrentRow.Cells("hargajual").Value
latihan_26b_009.jb46109009.Text = dgv_46109009.CurrentRow.Cells("persediaanawal").Value
latihan_26b_009.BM(latihan_26b_009.kb46109009.Text)
End Sub
End Class
Public Class latihan_26b_009
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tabel As New DataTable
Public Sub BM(ByVal A As String)
Dim ting As New OleDb.OleDbDataAdapter
Dim tong As String
tong = "SELECT MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, MASTERTRANSAKSI.KETERANGAN, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, [DETAILTRANSAKSI]![UNIT]*[DETAILTRANSAKSI]![HARGA] AS JUMLAH FROM DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS = MASTERTRANSAKSI.NOTRANS WHERE KODEBARANG = '" & A & "'"
ting = New OleDb.OleDbDataAdapter(tong, koneksi)
ting.Fill(tabel)
Dim ichal1 As Integer = 0
Dim ichal2 As Integer = 0
For Each ichal3 As DataRow In tabel.Rows
ichal1 += ichal3("Unit")
ichal2 += ichal3("Jumlah")
Next
tu46109009.Text = ichal1
tj46109009.Text = ichal2
End Sub
Private Sub latihan_26b_009_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
dgv_46109009.DataSource = tabel
End Sub
End Class
scrift Latihan 25a
BalasHapusPublic Class latihan_25a_026
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tabel As New DataTable
Private Sub Latihan_25a_026_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", koneksi)
tabel.Rows.Clear()
adapter.Fill(tabel)
adapter.Dispose()
data_46109040.DataSource = tabel
End Sub
Private Sub detail_46109040_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles detail_46109040.Click
If latihan_25b_026.Visible = False Then
latihan_25b_026.Show()
Else : latihan_25b_026.Activate()
End If
latihan_25b_026.kode_46109040.Text = data_46109040.CurrentRow.Cells("kodebarang").Value
latihan_25b_026.nama_46109040.Text = data_46109040.CurrentRow.Cells("namabarang").Value
latihan_25b_026.harga_46109040.Text = data_46109040.CurrentRow.Cells("hargajual").Value
latihan_25b_026.jumlah_46109040.Text = data_46109040.CurrentRow.Cells("persediaanawal").Value
latihan_25b_026.ukky_46109040(latihan_25b_026.kode_46109040.Text)
End Sub
End Class
scrift Latihan 25b
Public Class latihan_25b_026
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tabel As New DataTable
Public Sub ukky_46109040(ByVal U As String)
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, mastertransaksi.keterangan, detailtransaksi.unit, detailtransaksi.harga, detailtransaksi.unit * detailtransaksi.harga as jumlah from mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans where kodebarang='" & U & "'", koneksi)
tabel.Rows.Clear()
adapter.Fill(tabel)
data_46109040.DataSource = tabel
End Sub
End Class
scrift Latihan 26a
BalasHapusPublic Class latihan_26a_026
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tabel As New DataTable
Private Sub Latihan_26a_026_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", koneksi)
tabel.Rows.Clear()
adapter.Fill(tabel)
adapter.Dispose()
data_46109040.DataSource = tabel
End Sub
Private Sub detail_46109040_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles detail_46109040.Click
If latihan_26b_026.Visible = False Then
latihan_26b_026.Show()
Else : latihan_26b_026.Activate()
End If
latihan_26b_026.kode_46109040.Text = data_46109040.CurrentRow.Cells("kodebarang").Value
latihan_26b_026.nama_46109040.Text = data_46109040.CurrentRow.Cells("namabarang").Value
latihan_26b_026.harga_46109040.Text = data_46109040.CurrentRow.Cells("hargajual").Value
latihan_26b_026.jumlah_46109040.Text = data_46109040.CurrentRow.Cells("persediaanawal").Value
latihan_26b_026.ukky_46109040(latihan_26b_026.kode_46109040.Text)
End Sub
End Class
scrift Latihan 26b
Public Class latihan_26b_026
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tabel As New DataTable
Public Sub ukky_46109040(ByVal U As String)
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, mastertransaksi.keterangan, detailtransaksi.unit, detailtransaksi.harga, detailtransaksi.unit * detailtransaksi.harga as jumlah from mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans where kodebarang='" & U & "'", koneksi)
tabel.Rows.Clear()
adapter.Fill(tabel)
data_46109040.DataSource = tabel
End Sub
End Class
Komentar ini telah dihapus oleh pengarang.
BalasHapusKomentar ini telah dihapus oleh pengarang.
BalasHapusNama : Ismi Sri Wahyuni
BalasHapusNim : 46109023
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim yuni As New DataTable
Private Sub data_023_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles data_023.CellContentClick
End Sub
Private Sub Form23A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ismi As New OleDb.OleDbDataAdapter
ismi = New OleDb.OleDbDataAdapter("select*from mastertransaksi", koneksi)
yuni.Rows.Clear()
ismi.Fill(yuni)
ismi.Dispose()
data_023.DataSource = yuni
End Sub
Private Sub Klik_023_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Klik_023.Click
If Form23b.Visible = False Then
Form23b.Show()
Else : Form23b.Activate()
End If
Form23b.TextBox1.Text = data_023.CurrentRow.Cells("notrans").Value
Form23b.DateTimePicker1.Value = data_023.CurrentRow.Cells("tanggaltransaksi").Value
Form23b.TextBox2.Text = data_023.CurrentRow.Cells("jenistransaksi").Value
Form23b.cimi(Form23b.TextBox1.Text)
End Sub
End Class
Public Class Form23b
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim yuni As New DataTable
Public Sub cimi(ByVal a As String)
Dim ismi As New OleDb.OleDbDataAdapter
ismi = New OleDb.OleDbDataAdapter("select*from detailtransaksi where notrans='" & a & "'", koneksi)
yuni.Rows.Clear()
ismi.Fill(yuni)
data_023.DataSource = yuni
End Sub
Nama : Ismi Sri Wahyuni
BalasHapusNim : 46109023
Public Class Form24A
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim yuni As New DataTable
Private Sub Form23c_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ismi As New OleDb.OleDbDataAdapter
ismi = New OleDb.OleDbDataAdapter("select*from barang", koneksi)
yuni.Rows.Clear()
ismi.Fill(yuni)
ismi.Dispose()
D_46109023.DataSource = yuni
End Sub
Private Sub DT_46109023_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DT_46109023.Click
If Form24b.Visible = False Then
Form24b.Show()
Else : Form24b.Activate()
End If
Form24b.TextBox1.Text = D_46109023.CurrentRow.Cells("kodebarang").Value
Form24b.TextBox2.Text = D_46109023.CurrentRow.Cells("namabarang").Value
Form24b.TextBox3.Text = D_46109023.CurrentRow.Cells("hargajual").Value
Form24b.TextBox4.Text = D_46109023.CurrentRow.Cells("persediaanawal").Value
Form24b.cimi(Form23d.TextBox1.Text)
End Sub
Public Class Form24b
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim yuni As New DataTable
Public Sub cimi(ByVal a As String)
Dim ismi As New OleDb.OleDbDataAdapter
ismi = New OleDb.OleDbDataAdapter("select*from detailtransaksi where kodebarang='" & a & "'", koneksi)
yuni.Rows.Clear()
ismi.Fill(yuni)
ismi.Dispose()
D_46109023.DataSource = yuni
End Sub
Nama : Ismi Sri Wahyuni
BalasHapusNim : 46109023
Public Class Form25a
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim yuni As New DataTable
Private Sub Form25a_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ismi As New OleDb.OleDbDataAdapter
ismi = New OleDb.OleDbDataAdapter("select*from barang", koneksi)
yuni.Rows.Clear()
ismi.Fill(yuni)
ismi.Dispose()
Data_46109023.DataSource = yuni
End Sub
Private Sub DT_46109023_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DT_46109023.Click
If Form25b.Visible = False Then
Form25b.Show()
Else : Form25b.Activate()
End If
Form25b.TextBox1.Text = Data_46109023.CurrentRow.Cells("kodebarang").Value
Form25b.TextBox2.Text = Data_46109023.CurrentRow.Cells("namabarang").Value
Form25b.TextBox3.Text = Data_46109023.CurrentRow.Cells("hargajual").Value
Form25b.TextBox4.Text = Data_46109023.CurrentRow.Cells("persediaanawal").Value
Form25b.cimi(Form25b.TextBox1.Text)
End Sub
Public Class Form25b
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim yuni As New DataTable
Public Sub cimi(ByVal a As String)
Dim ismi As New OleDb.OleDbDataAdapter
ismi = New OleDb.OleDbDataAdapter("select*from detailtransaksi where kodebarang='" & a & "'", koneksi)
yuni.Rows.Clear()
ismi.Fill(yuni)
Data_46109023.DataSource = yuni
End Sub
Nama : Ismi Sri Wahyuni
BalasHapusNim : 46109023
Public Class Form26a
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim yuni As New DataTable
Private Sub Form26a_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ismi As New OleDb.OleDbDataAdapter
ismi = New OleDb.OleDbDataAdapter("select*from barang", koneksi)
yuni.Rows.Clear()
ismi.Fill(yuni)
ismi.Dispose()
Data_46109023.DataSource = yuni
End Sub
Private Sub dt_46109023_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dt_46109023.Click
If Form26b.Visible = False Then
Form26b.Show()
Else : Form26b.Activate()
End If
Form26b.TextBox1.Text = Data_46109023.CurrentRow.Cells("kodebarang").Value
Form26b.TextBox2.Text = Data_46109023.CurrentRow.Cells("namabarang").Value
Form26b.TextBox3.Text = Data_46109023.CurrentRow.Cells("hargajual").Value
Form26b.TextBox4.Text = Data_46109023.CurrentRow.Cells("persediaanawal").Value
Form26b.cimi(Form26b.TextBox1.Text)
End Sub
End Class
Public Class Form26b
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim yuni As New DataTable
Public Sub cimi(ByVal A As String)
Dim cimi1 As New OleDb.OleDbDataAdapter
Dim cimi2 As String
cimi2 = "SELECT MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, MASTERTRANSAKSI.KETERANGAN, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, [DETAILTRANSAKSI]![UNIT]*[DETAILTRANSAKSI]![HARGA] AS JUMLAH FROM DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS = MASTERTRANSAKSI.NOTRANS WHERE KODEBARANG = '" & A & "'"
cimi1 = New OleDb.OleDbDataAdapter(cimi2, koneksi)
cimi1.Fill(yuni)
Dim as1 As Integer = 0
Dim as2 As Integer = 0
For Each as3 As DataRow In yuni.Rows
as1 += as3("Unit")
as2 += as3("Jumlah")
Next
Tot_unit.Text = as1
Tot_jum.Text = as2
End Sub