Public Class Form15 Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Private Sub Form15_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim B As New OleDb.OleDbDataAdapter B = New OleDb.OleDbDataAdapter("Select * from BARANG", A) B.Fill(datatabel1) DGV076.DataSource = datatabel1 End Sub End Class
Public Class Form16 Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Private Sub Form16_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim B As New OleDb.OleDbDataAdapter B = New OleDb.OleDbDataAdapter("Select * from MASTERTRANSAKSI", A) B.Fill(datatabel1) DGV076.DataSource = datatabel1 End Sub End Class
Public Class Form17
Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Private Sub Form17_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim B As New OleDb.OleDbDataAdapter B = New OleDb.OleDbDataAdapter("Select * From DETAILTRANSAKSI", A) B.Fill(datatabel1) DGV076.DataSource = datatabel1 End Sub End Class
Public Class Form18 Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub Form18_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim B As New OleDb.OleDbDataAdapter B = New OleDb.OleDbDataAdapter("Select BARANG.KODEBARANG, NAMABARANG, DETAILTRANSAKSI.NOTRANS, UNIT, HARGA From DETAILTRANSAKSI INNER JOIN BARANG ON DETAILTRANSAKSI.KODEBARANG=BARANG.KODEBARANG", A) B.Fill(datatabel1) DGV076.DataSource = datatabel1 End Sub End Class
Public Class Form19 Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub FORM19_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim B As New OleDb.OleDbDataAdapter B = New OleDb.OleDbDataAdapter("Select MASTERTRANSAKSI.NOTRANS, TANGGALTRANSAKSI, JENISTRANSAKSI, DETAILTRANSAKSI.KODEBARANG, UNIT, HARGA From DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS=MASTERTRANSAKSI.NOTRANS", A) B.Fill(datatabel1) DGV076.DataSource = datatabel1 End Sub End Class
Public Class Form20 Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub FORM20_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim B As New OleDb.OleDbDataAdapter B = New OleDb.OleDbDataAdapter("Select BARANG.KODEBARANG, BARANG.NAMABARANG, MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA From (DETAILTRANSAKSI INNER JOIN BARANG ON DETAILTRANSAKSI.KODEBARANG=BARANG.KODEBARANG)INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS=MASTERTRANSAKSI.NOTRANS", A) B.Fill(datatabel1) DGV076.DataSource = datatabel1 End Sub End Class
Public Class Form21 Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim dset As New DataSet 'Deklarasi dataset' Dim Bsource1 As New BindingSource 'Deklarasi bindingsource' Dim Bsource2 As New BindingSource
Private Sub Form21_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim B1 As New OleDb.OleDbDataAdapter B1 = New OleDb.OleDbDataAdapter("Select * From MASTERTRANSAKSI", A) B1.Fill(datatabel1)
Dim datatabel2 As New DataTable Dim B2 As New OleDb.OleDbDataAdapter B2 = New OleDb.OleDbDataAdapter("Select * From DETAILTRANSAKSI", A) B2.Fill(datatabel2)
'Memasukkan datatabel dalam dataset' dset.Tables.Add(datatabel1) dset.Tables.Add(datatabel2)
'Menggati nama datatabel dalam dataset' datatabel1.TableName = "T01" datatabel2.TableName = "T02"
'Menambahkan relasi dalam dataset' dset.Relations.Add(New DataRelation("X", dset.Tables("T01").Columns("NOTRANS"), dset.Tables("T02").Columns("NOTRANS")))
'Datasource dan membersource' Bsource1.DataSource = dset Bsource1.DataMember = "T01" Bsource2.DataSource = Bsource1 Bsource2.DataMember = "X"
'Memasukkan datatabel dari bindingsource ke dalam DVG' DGV076A.DataSource = Bsource1 DGV076B.DataSource = Bsource2 End Sub End Class
Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim dset As New DataSet 'Deklarasi dataset' Dim Bsource1 As New BindingSource 'Deklarasi bindingsource' Dim Bsource2 As New BindingSource
Private Sub Form22_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim B1 As New OleDb.OleDbDataAdapter B1 = New OleDb.OleDbDataAdapter("Select * From MASTERTRANSAKSI", A) B1.Fill(datatabel1)
Dim datatabel2 As New DataTable Dim B2 As New OleDb.OleDbDataAdapter B2 = New OleDb.OleDbDataAdapter("Select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, DETAILTRANSAKSI.KODEBARANG, BARANG.NAMABARANG, DETAILTRANSAKSI.UNIT*BARANG.HARGAJUAL AS JUMLAHSTANDAR, DETAILTRANSAKSI.UNIT*DETAILTRANSAKSI.HARGA AS JUMLAHREALISASI From DETAILTRANSAKSI INNER JOIN BARANG ON DETAILTRANSAKSI.KODEBARANG=BARANG.KODEBARANG", A) B2.Fill(datatabel2)
'Memasukkan datatabel dalam dataset' dset.Tables.Add(datatabel1) dset.Tables.Add(datatabel2)
'Menggati nama datatabel dalam dataset' datatabel1.TableName = "T01" datatabel2.TableName = "T02"
'Menambahkan relasi dalam dataset' dset.Relations.Add(New DataRelation("X", dset.Tables("T01").Columns("NOTRANS"), dset.Tables("T02").Columns("NOTRANS")))
'Datasource dan membersource' Bsource1.DataSource = dset Bsource1.DataMember = "T01" Bsource2.DataSource = Bsource1 Bsource2.DataMember = "X"
'Memasukkan datatabel dari bindingsource ke dalam DVG' DGV076A.DataSource = Bsource1 DGV076B.DataSource = Bsource2 End Sub End Class
Public Class Form15 Dim Jalan As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataTransaksijualbeli.ACCDB") Dim Ember As New DataTable
Private Sub Form15_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Mendeklarasikan kendaraan Dim mobil As New OleDb.OleDbDataAdapter
'Mengatur data yang akan diangkut mobil = New OleDb.OleDbDataAdapter("select * from barang", jalan)
'Untuk memasukkan data yang telah diangkut kedalam datatable mobil.Fill(ember)
'Untuk menampilkan isi datatable ke datagridview DGV_071.DataSource = ember mobil.Dispose() End Sub End Class
Public Class Form16 Dim Jalan As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataTransaksijualbeli.ACCDB") Dim Ember As New DataTable Private Sub Form16_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Mendeklarasikan kendaraan Dim mobil As New OleDb.OleDbDataAdapter
'Mengatur data yang akan diangkut mobil = New OleDb.OleDbDataAdapter("select * from mastertransaksi", Jalan)
'Untuk memasukkan data yang telah diangkut kedalam datatable mobil.Fill(Ember)
'Untuk menampilkan isi datatable ke datagridview DGV_071.DataSource = Ember mobil.Dispose() End Sub End Class
Public Class Form17 Dim Jalan As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataTransaksijualbeli.ACCDB") Dim Ember As New DataTable Private Sub Form17_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Mendeklarasikan kendaraan Dim mobil As New OleDb.OleDbDataAdapter
'Mengatur data yang akan diangkut mobil = New OleDb.OleDbDataAdapter("select * from detailtransaksi", Jalan)
'Untuk memasukkan data yang telah diangkut kedalam datatable mobil.Fill(Ember)
'Untuk menampilkan isi datatable ke datagridview DGV_071.DataSource = Ember mobil.Dispose() End Sub End Class
Form 18
Public Class Form18 Dim Jalan As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataTransaksijualbeli.ACCDB") Dim Ember As New DataTable Private Sub Form18_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Mendeklarasikan kendaraan Dim mobil As New OleDb.OleDbDataAdapter
'Mengatur data yang akan diangkut mobil = New OleDb.OleDbDataAdapter("SELECT barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga FROM BARANG Inner join Detailtransaksi on barang.kodebarang = detailtransaksi.kodebarang", Jalan)
'Untuk memasukkan data yang telah diangkut kedalam datatable mobil.Fill(Ember)
'Untuk menampilkan isi datatable ke datagridview DGV_071.DataSource = Ember mobil.Dispose() End Sub End Class
Form19
Public Class Form19 Dim Jalan As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataTransaksijualbeli.ACCDB") Dim Ember As New DataTable
Private Sub Form19_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Mendeklarasikan kendaraan Dim mobil As New OleDb.OleDbDataAdapter
'Mengatur data yang akan diangkut mobil = New OleDb.OleDbDataAdapter("SELECT MAstertransaksi.Notrans, Mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.kodebarang, detailtransaksi.unit, detailtransaksi.harga FROM mastertransaksi Inner join Detailtransaksi on mastertransaksi.notrans = detailtransaksi.notrans", Jalan)
'Untuk memasukkan data yang telah diangkut kedalam datatable mobil.Fill(Ember)
'Untuk menampilkan isi datatable ke datagridview DGV_071.DataSource = Ember mobil.Dispose() End Sub End Class
FORM 15 Public Class latihan_15_084 Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Private Sub latihan_15_084_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim B As New OleDb.OleDbDataAdapter B = New OleDb.OleDbDataAdapter("select * from Barang", A) B.Fill(datatabel1) dgv_084.DataSource = datatabel1 End Sub End Class
FORM 16 Public Class latihan_16_084 Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Private Sub latihan_16_084_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim B As New OleDb.OleDbDataAdapter B = New OleDb.OleDbDataAdapter("select * from MASTERTRANSAKSI", A) B.Fill(datatabel1) dgv_084.DataSource = datatabel1 End Sub End Class
FORM 17 Public Class latihan_17_084 Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Private Sub latihan_17_084_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim B As New OleDb.OleDbDataAdapter B = New OleDb.OleDbDataAdapter("select * from DETAILTRANSAKSI", A) B.Fill(datatabel1) dgv_084.DataSource = datatabel1 End Sub End Class
FORM 18 Public Class latihan_18_084 Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub latihan_18_084_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim B As New OleDb.OleDbDataAdapter B = New OleDb.OleDbDataAdapter("Select BARANG.KODEBARANG, NAMABARANG, DETAILTRANSAKSI.NOTRANS, UNIT, HARGA From DETAILTRANSAKSI INNER JOIN BARANG ON DETAILTRANSAKSI.KODEBARANG=BARANG.KODEBARANG", A) B.Fill(datatabel1) DGV_084.DataSource = datatabel1 End Sub End Class
FORM 19 Public Class latihan_19_084 Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Private Sub latihan_19_084_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim B As New OleDb.OleDbDataAdapter B = New OleDb.OleDbDataAdapter("select MASTERTRANSAKSI.NOTRANS,TANGGALTRANSAKSI,JENISTRANSAKSI,DETAILTRANSAKSI.KODEBARANG,UNIT,HARGA from DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS=MASTERTRANSAKSI.NOTRANS", A) B.Fill(datatabel1) dgv_084.DataSource = datatabel1 End Sub End Class
FORM 20 Public Class latihan_20_084 Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Private Sub latihan_20_084_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim B As New OleDb.OleDbDataAdapter B = New OleDb.OleDbDataAdapter("Select BARANG.KODEBARANG, BARANG.NAMABARANG, MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from (DETAILTRANSAKSI INNER JOIN BARANG ON DETAILTRANSAKSI.KODEBARANG=BARANG.KODEBARANG) INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS=MASTERTRANSAKSI.NOTRANS", A) B.Fill(datatabel1) dgv_084.DataSource = datatabel1 End Sub End Class
FORM 21 Public Class latihan_21_084 Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim dset As New DataSet 'Deklarasi dataset' Dim Bsource1 As New BindingSource 'Deklarasi Bindingsource' Dim Bsource2 As New BindingSource Private Sub latihan_21_084_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim B1 As New OleDb.OleDbDataAdapter B1 = New OleDb.OleDbDataAdapter("select * from MASTERTRANSAKSI", A) B1.Fill(datatabel1) Dim datatabel2 As New DataTable Dim B2 As New OleDb.OleDbDataAdapter B2 = New OleDb.OleDbDataAdapter("select * from DETAILTRANSAKSI", A) B2.Fill(datatabel2) 'Memasukkan datatabel dalam dataset' dset.Tables.Add(datatabel1) dset.Tables.Add(datatabel2) 'Menggati nama datatabel dalam dataset' datatabel1.TableName = "T01" datatabel2.TableName = "T02" 'Menambahkan relasi dalam dataset' dset.Relations.Add(New DataRelation("X", dset.Tables("T01").Columns("NOTRANS"), dset.Tables("T02").Columns("NOTRANS"))) 'Datasource dan membersource' Bsource1.DataSource = dset Bsource1.DataMember = "T01" Bsource2.DataSource = Bsource1 Bsource2.DataMember = "X" 'Memasukkan datatabel dari bindingsource ke dalam DVG' DGV1_084.DataSource = Bsource1 DGV2_084.DataSource = Bsource2 End Sub End Class
FORM 22 Public Class latihan_22_084 Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim dset As New DataSet 'Deklarasi dataset' Dim Bsource1 As New BindingSource 'Deklarasi bindingsource' Dim Bsource2 As New BindingSource Private Sub latihan_22_084_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim B1 As New OleDb.OleDbDataAdapter B1 = New OleDb.OleDbDataAdapter("Select * From MASTERTRANSAKSI", A) B1.Fill(datatabel1) Dim datatabel2 As New DataTable Dim B2 As New OleDb.OleDbDataAdapter B2 = New OleDb.OleDbDataAdapter("Select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, DETAILTRANSAKSI.KODEBARANG, BARANG.NAMABARANG, DETAILTRANSAKSI.UNIT*BARANG.HARGAJUAL AS JUMLAHSTANDAR, DETAILTRANSAKSI.UNIT*DETAILTRANSAKSI.HARGA AS JUMLAHREALISASI From DETAILTRANSAKSI INNER JOIN BARANG ON DETAILTRANSAKSI.KODEBARANG=BARANG.KODEBARANG", A) B2.Fill(datatabel2) 'Memasukkan datatabel dalam dataset' dset.Tables.Add(datatabel1) dset.Tables.Add(datatabel2) 'Menggati nama datatabel dalam dataset' datatabel1.TableName = "T01" datatabel2.TableName = "T02" 'Menambahkan relasi dalam dataset' dset.Relations.Add(New DataRelation("X", dset.Tables("T01").Columns("NOTRANS"), dset.Tables("T02").Columns("NOTRANS"))) 'Datasource dan membersource' Bsource1.DataSource = dset Bsource1.DataMember = "T01" Bsource2.DataSource = Bsource1 Bsource2.DataMember = "X" 'Memasukkan datatabel dari bindingsource ke dalam DVG' dgv1_084.DataSource = Bsource1 dgv2_084.DataSource = Bsource2 End Sub End Class
FORM 15 Public Class latihan_15_064 Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Private Sub Latihan15017_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim B As New OleDb.OleDbDataAdapter B = New OleDb.OleDbDataAdapter("Select * from BARANG", A) B.Fill(datatabel1) DataGridView_064.DataSource = datatabel1 End Sub End Class
FORM 16 Public Class latihan_16_064 Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Private Sub latihan_16_064_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim B As New OleDb.OleDbDataAdapter B = New OleDb.OleDbDataAdapter("Select * from MASTERTRANSAKSI", A) B.Fill(datatabel1) DataGridView_064.DataSource = datatabel1 End Sub End Class
FORM 17 Public Class latihan_17_064 Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Private Sub latihan_17_064_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim B As New OleDb.OleDbDataAdapter B = New OleDb.OleDbDataAdapter("Select * from DETAILTRANSAKSI", A) B.Fill(datatabel1) DataGridView_064.DataSource = datatabel1 End Sub End Class
FORM 18 Public Class latihan_18_064 Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Private Sub latihan_18_064_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim B As New OleDb.OleDbDataAdapter B = New OleDb.OleDbDataAdapter("select BARANG.KODEBARANG,NAMABARANG,DETAILTRANSAKSI.NOTRANS,UNIT,HARGA FROM DETAILTRANSAKSI INNER JOIN BARANG ON DETAILTRANSAKSI.KODEBARANG=BARANG.KODEBARANG", A) B.Fill(datatabel1) DataGridView_064.DataSource = datatabel1 End Sub End Class
\Public Class latihan_22_064 Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim dset As New DataSet 'Deklarasi dataset' Dim Bsource1 As New BindingSource 'Deklarasi bindingsource' Dim Bsource2 As New BindingSource
Private Sub latihan_22_064_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim B1 As New OleDb.OleDbDataAdapter B1 = New OleDb.OleDbDataAdapter("Select * From MASTERTRANSAKSI", A) B1.Fill(datatabel1)
Dim datatabel2 As New DataTable Dim B2 As New OleDb.OleDbDataAdapter B2 = New OleDb.OleDbDataAdapter("Select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, DETAILTRANSAKSI.KODEBARANG, BARANG.NAMABARANG, DETAILTRANSAKSI.UNIT*BARANG.HARGAJUAL AS JUMLAHSTANDAR, DETAILTRANSAKSI.UNIT*DETAILTRANSAKSI.HARGA AS JUMLAHREALISASI From DETAILTRANSAKSI INNER JOIN BARANG ON DETAILTRANSAKSI.KODEBARANG=BARANG.KODEBARANG", A) B2.Fill(datatabel2)
'Memasukkan datatabel dalam dataset' dset.Tables.Add(datatabel1) dset.Tables.Add(datatabel2)
'Menggati nama datatabel dalam dataset' datatabel1.TableName = "T01" datatabel2.TableName = "T02"
'Menambahkan relasi dalam dataset' dset.Relations.Add(New DataRelation("X", dset.Tables("T01").Columns("NOTRANS"), dset.Tables("T02").Columns("NOTRANS")))
'Datasource dan membersource' Bsource1.DataSource = dset Bsource1.DataMember = "T01" Bsource2.DataSource = Bsource1 Bsource2.DataMember = "X" 'Memasukkan datatabel dari bindingsource ke dalam DVG' DataGridView_1064.DataSource = Bsource1 DataGridView_2064.DataSource = Bsource2 End Sub End Class
FORM 19 Public Class latihan_19_064 Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub latihan_19_064_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim B As New OleDb.OleDbDataAdapter B = New OleDb.OleDbDataAdapter("select MASTERTRANSAKSI.NOTRANS, TANGGALTRANSAKSI, JENISTRANSAKSI, DETAILTRANSAKSI.KODEBARANG, UNIT, HARGA From DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS=MASTERTRANSAKSI.NOTRANS", A) B.Fill(datatabel1) DataGridView_064.DataSource = datatabel1 End Sub End Class
FORM 20 Public Class latihan_20_064 Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub latihan_20_026_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim B As New OleDb.OleDbDataAdapter B = New OleDb.OleDbDataAdapter("Select BARANG.KODEBARANG, BARANG.NAMABARANG, MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA From (DETAILTRANSAKSI INNER JOIN BARANG ON DETAILTRANSAKSI.KODEBARANG=BARANG.KODEBARANG)INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS=MASTERTRANSAKSI.NOTRANS", A) B.Fill(datatabel1) DataGridView_064.DataSource = datatabel1 End Sub End Class
FORM 21 Public Class latihan_21_064
Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim dset As New DataSet 'Deklarasi dataset' Dim Bsource1 As New BindingSource 'Deklarasi bindingsource' Dim Bsource2 As New BindingSource
Private Sub latihan_21_064_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim B1 As New OleDb.OleDbDataAdapter B1 = New OleDb.OleDbDataAdapter("Select * From MASTERTRANSAKSI", A) B1.Fill(datatabel1)
Dim datatabel2 As New DataTable Dim B2 As New OleDb.OleDbDataAdapter B2 = New OleDb.OleDbDataAdapter("Select * From DETAILTRANSAKSI", A) B2.Fill(datatabel2)
'Memasukkan datatabel dalam dataset' dset.Tables.Add(datatabel1) dset.Tables.Add(datatabel2)
'Menggati nama datatabel dalam dataset' datatabel1.TableName = "T01" datatabel2.TableName = "T02"
'Menambahkan relasi dalam dataset' dset.Relations.Add(New DataRelation("X", dset.Tables("T01").Columns("NOTRANS"), dset.Tables("T02").Columns("NOTRANS")))
'Datasource dan membersource' Bsource1.DataSource = dset Bsource1.DataMember = "T01" Bsource2.DataSource = Bsource1 Bsource2.DataMember = "X"
'Memasukkan datatabel dari bindingsource ke dalam DVG' DataGridView_1064.DataSource = Bsource1 DataGridView_2064.DataSource = Bsource2 End Sub End Class
Dim danang As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Private Sub latihan15_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim prayudha As New OleDb.OleDbDataAdapter prayudha = New OleDb.OleDbDataAdapter("Select * from BARANG", danang) prayudha.Fill(datatabel1) dgv069.DataSource = datatabel1 prayudha.Dispose() End Sub End Class
Public Class latihan_16_069 Dim danang As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Private Sub latihan_16_069_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim yudha As New OleDb.OleDbDataAdapter yudha = New OleDb.OleDbDataAdapter("Select * from MASTERTRANSAKSI", danang) yudha.Fill(datatabel1) dgv.DataSource = datatabel1
End Sub End Class
Public Class latihan_17_069 Dim danang As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub latihan_17_069_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim prayudha As New DataTable Dim B As New OleDb.OleDbDataAdapter B = New OleDb.OleDbDataAdapter("Select * From DETAILTRANSAKSI", danang) B.Fill(prayudha) dgv069.DataSource = prayudha
Public Class latihan_18_069 Dim danang As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub latihan_18_069_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim prayudha As New DataTable Dim B As New OleDb.OleDbDataAdapter B = New OleDb.OleDbDataAdapter("Select BARANG.KODEBARANG, NAMABARANG, DETAILTRANSAKSI.NOTRANS, UNIT, HARGA From DETAILTRANSAKSI INNER JOIN BARANG ON DETAILTRANSAKSI.KODEBARANG=BARANG.KODEBARANG", danang) B.Fill(prayudha) dgv.DataSource = prayudha
End Sub End Class
Public Class latihan_19_069 Dim danang As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub latihan_19_069_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim prayudha As New DataTable Dim B As New OleDb.OleDbDataAdapter B = New OleDb.OleDbDataAdapter("Select MASTERTRANSAKSI.NOTRANS, TANGGALTRANSAKSI, JENISTRANSAKSI, DETAILTRANSAKSI.KODEBARANG, UNIT, HARGA From DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS=MASTERTRANSAKSI.NOTRANS", danang) B.Fill(prayudha) dgv.DataSource = prayudha
End Sub End Class
Public Class latihan_20_069 Dim danang As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub latihan_20_069_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim prayudha As New DataTable Dim dwi As New OleDb.OleDbDataAdapter dwi = New OleDb.OleDbDataAdapter("Select BARANG.KODEBARANG, BARANG.NAMABARANG, MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA From (DETAILTRANSAKSI INNER JOIN BARANG ON DETAILTRANSAKSI.KODEBARANG=BARANG.KODEBARANG)INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS=MASTERTRANSAKSI.NOTRANS", danang) dwi.Fill(prayudha) DataGridView1.DataSource = prayudha
Public Class latihan_21_069 Dim danang As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim dset As New DataSet 'Deklarasi dataset' Dim Bsource1 As New BindingSource 'Deklarasi bindingsource' Dim Bsource2 As New BindingSource
Private Sub latihan_21_069_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim B1 As New OleDb.OleDbDataAdapter B1 = New OleDb.OleDbDataAdapter("Select * From MASTERTRANSAKSI", danang) B1.Fill(datatabel1)
Dim datatabel2 As New DataTable Dim B2 As New OleDb.OleDbDataAdapter B2 = New OleDb.OleDbDataAdapter("Select * From DETAILTRANSAKSI", danang) B2.Fill(datatabel2)
'Memasukkan datatabel dalam dataset' dset.Tables.Add(datatabel1) dset.Tables.Add(datatabel2)
'Menggati nama datatabel dalam dataset' datatabel1.TableName = "T01" datatabel2.TableName = "T02"
'Menambahkan relasi dalam dataset' dset.Relations.Add(New DataRelation("X", dset.Tables("T01").Columns("NOTRANS"), dset.Tables("T02").Columns("NOTRANS")))
'Datasource dan membersource' Bsource1.DataSource = dset Bsource1.DataMember = "T01" Bsource2.DataSource = Bsource1 Bsource2.DataMember = "X"
'Memasukkan datatabel dari bindingsource ke dalam DVG' dgv.DataSource = Bsource1 dgv2.DataSource = Bsource2
End Sub End Class
Public Class latihan_22_069 Dim danang As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim dset As New DataSet 'Deklarasi dataset' Dim Bsource1 As New BindingSource 'Deklarasi bindingsource' Dim Bsource2 As New BindingSource
Private Sub latihan_22_069_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim prayudha As New DataTable Dim B1 As New OleDb.OleDbDataAdapter B1 = New OleDb.OleDbDataAdapter("Select * From MASTERTRANSAKSI", danang) B1.Fill(prayudha)
Dim prayudha2 As New DataTable Dim B2 As New OleDb.OleDbDataAdapter B2 = New OleDb.OleDbDataAdapter("Select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, DETAILTRANSAKSI.KODEBARANG, BARANG.NAMABARANG, DETAILTRANSAKSI.UNIT*BARANG.HARGAJUAL AS JUMLAHSTANDAR, DETAILTRANSAKSI.UNIT*DETAILTRANSAKSI.HARGA AS JUMLAHREALISASI From DETAILTRANSAKSI INNER JOIN BARANG ON DETAILTRANSAKSI.KODEBARANG=BARANG.KODEBARANG", danang) B2.Fill(prayudha2)
'Memasukkan datatabel dalam dataset' dset.Tables.Add(prayudha) dset.Tables.Add(prayudha2)
'Menggati nama datatabel dalam dataset' prayudha.TableName = "T01" prayudha2.TableName = "T02"
'Menambahkan relasi dalam dataset' dset.Relations.Add(New DataRelation("X", dset.Tables("T01").Columns("NOTRANS"), dset.Tables("T02").Columns("NOTRANS")))
'Datasource dan membersource' Bsource1.DataSource = dset Bsource1.DataMember = "T01" Bsource2.DataSource = Bsource1 Bsource2.DataMember = "X"
'Memasukkan datatabel dari bindingsource ke dalam DVG' dgv.DataSource = Bsource1 dgv2.DataSource = Bsource2
Public Class Latihan15 Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub Latihan15_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim B As New OleDb.OleDbDataAdapter B = New OleDb.OleDbDataAdapter("Select * from barang", A) B.Fill(datatabel1) dgv070.DataSource = datatabel1 End Sub End Class
Public Class Latihan16 Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub Latihan16_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim B As New OleDb.OleDbDataAdapter B = New OleDb.OleDbDataAdapter("Select * from Mastertransaksi", A) B.Fill(datatabel1) dgv070.DataSource = datatabel1 End Sub End Class
Public Class Latihan17 Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub Latihan17_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim B As New OleDb.OleDbDataAdapter B = New OleDb.OleDbDataAdapter("Select * from Detailtransaksi", A) B.Fill(datatabel1) Dgv070.DataSource = datatabel1 End Sub End Class
Public Class Latihan18 Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub Latihan18_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim B As New OleDb.OleDbDataAdapter B = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang", A) B.Fill(datatabel1) dgv070.DataSource = datatabel1 End Sub End Class
Public Class Latihan19 Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub Latihan19_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim B As New OleDb.OleDbDataAdapter B = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.kodebarang, detailtransaksi.unit, detailtransaksi.harga from mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans", A) B.Fill(datatabel1) dgv070.DataSource = datatabel1 End Sub End Class
Public Class Latihan20 Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub Latihan20_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim B As New OleDb.OleDbDataAdapter B = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang", A) B.Fill(datatabel1) dgv070.DataSource = datatabel1 End Sub End Class
Public Class Latihan21 Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim dset As New DataSet 'Deklarasi dataset' Dim Bsource1 As New BindingSource 'Deklarasi bindingsource' Dim Bsource2 As New BindingSource
Private Sub Latihan21_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim B1 As New OleDb.OleDbDataAdapter B1 = New OleDb.OleDbDataAdapter("Select * From Mastertransaksi", A) B1.Fill(datatabel1)
Dim datatabel2 As New DataTable Dim B2 As New OleDb.OleDbDataAdapter B2 = New OleDb.OleDbDataAdapter("Select * From detailtransaksi", A) B2.Fill(datatabel2)
'Memasukkan datatabel dalam dataset' dset.Tables.Add(datatabel1) dset.Tables.Add(datatabel2)
'Menggati nama datatabel dalam dataset' datatabel1.TableName = "T01" datatabel2.TableName = "T02"
'Menambahkan relasi dalam dataset' dset.Relations.Add(New DataRelation("X", dset.Tables("T01").Columns("notrans"), dset.Tables("T02").Columns("notrans")))
'Datasource dan membersource' Bsource1.DataSource = dset Bsource1.DataMember = "T01" Bsource2.DataSource = Bsource1 Bsource2.DataMember = "X"
'Memasukkan datatabel dari bindingsource ke dalam DVG' dgv1070.DataSource = Bsource1 dgv2070.DataSource = Bsource2 End Sub End Class
Public Class Latihan22
Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim dset As New DataSet 'Deklarasi dataset' Dim Bsource1 As New BindingSource 'Deklarasi bindingsource' Dim Bsource2 As New BindingSource
Private Sub Latihan22_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim B1 As New OleDb.OleDbDataAdapter B1 = New OleDb.OleDbDataAdapter("Select * From MASTERTRANSAKSI", A) B1.Fill(datatabel1)
Dim datatabel2 As New DataTable Dim B2 As New OleDb.OleDbDataAdapter B2 = New OleDb.OleDbDataAdapter("Select detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga, detailtransaksi.kodebarang, barang.namabarang, detailtransaksi.unit*barang.hargajual as jumlahstandart, detailtransaksi.unit*detailtransaksi.harga as jumlahrealisasi From detailtransaksi inner join barang on detailtransaksi.kodebarang=barang.kodebarang", A) B2.Fill(datatabel2)
'Memasukkan datatabel dalam dataset' dset.Tables.Add(datatabel1) dset.Tables.Add(datatabel2)
'Menggati nama datatabel dalam dataset' datatabel1.TableName = "T01" datatabel2.TableName = "T02"
'Menambahkan relasi dalam dataset' dset.Relations.Add(New DataRelation("X", dset.Tables("T01").Columns("notrans"), dset.Tables("T02").Columns("notrans")))
'Datasource dan membersource' Bsource1.DataSource = dset Bsource1.DataMember = "T01" Bsource2.DataSource = Bsource1 Bsource2.DataMember = "X"
'Memasukkan datatabel dari bindingsource ke dalam DVG' dgv1070.DataSource = Bsource1 dgv2070.DataSource = Bsource2 End Sub End Class
Public Class Form15 Dim caca As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataTransaksiJualBeli.ACCDB")
Private Sub Form15_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cece As New OleDb.OleDbDataAdapter Dim cici As New DataTable
cece = New OleDb.OleDbDataAdapter("select * from barang", caca) cece.Fill(cici) Dgv1.DataSource = cici cece.Dispose()
End Sub End Class
Public Class Form16 Dim caca As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataTransaksiJualBeli.ACCDB") Dim cici As New DataTable
Private Sub Form16_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cece As New OleDb.OleDbDataAdapter cece = New OleDb.OleDbDataAdapter("select * from mastertransaksi", caca) cece.Fill(cici) Dgv2().DataSource = cici cece.Dispose()
End Sub End Class
Public Class Form17 Dim caca As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataTransaksiJUalBeli.ACCDB") Dim cici As New DataTable
Private Sub Form17_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cece As New OleDb.OleDbDataAdapter cece = New OleDb.OleDbDataAdapter("select * from detailtransaksi", caca) cece.Fill(cici) DataGridView1.DataSource = cici cece.Dispose()
End Sub End Class
Public Class Form18 Dim caca As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataTransaksiJualBeli.ACCDB") Dim cici As New DataTable
Private Sub Form18_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cece As New OleDb.OleDbDataAdapter cece = New OleDb.OleDbDataAdapter("Select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from Barang inner join Detailtransaksi on barang.kodebarang = detailtransaksi.kodebarang", caca) cece.Fill(cici)
Public Class Form19 Dim caca As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataTransaksiJualBeli.ACCDB") Dim cici As New DataTable
Private Sub Form19_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cece As New OleDb.OleDbDataAdapter cece = New OleDb.OleDbDataAdapter("Select Mastertransaksi.Notrans, Mastertransaksi.tanggaltransaksi, Mastertransaksi.jenistransaksi, detailtransaksi.kodebarang,detailtransaksi.unit, detailtransaksi.harga from mastertransaksi Inner Join Detailtransaksi on mastertransaksi.notrsans = detailtransaksi.notrans", caca)
Public Class Form20 Dim caca As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataTransaksiJualBeli.ACCDB") Dim cici As New DataTable
Private Sub Form20_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cece As New OleDb.OleDbDataAdapter cece = New OleDb.OleDbDataAdapter("Select Barang.Kodebarang, Barang.Namabarang,MasterTransaksi.Notrans, MasterTransaksi.Tanggaltansaksi, Mastertransaksi.JenisTransaksi, Detailtransaksi.Unit, Detailtransaksi.Harga from (Detailtransaksi Inner Join Barang on Detailtransaksi.Kodebarang = Barang.Kodebarang) Inner Join Mastertransaksi on Detailtransaksi.Notrans = Mastertransaksi.Notrans", caca) cece.Fill(cici) DataGridView1.DataSource = cici cece.Dispose()
End Sub End Class
Public Class Form21 Dim cute As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\Datatransaksijualbeli.ACCDB") Dim dset As New DataSet Dim cute1 As New BindingSource Dim cute2 As New BindingSource
Private Sub Form21_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim ct1 As New OleDb.OleDbDataAdapter ct1 = New OleDb.OleDbDataAdapter("select * from Mastertransaksi", cute) ct1.Fill(datatabel1)
Dim datatabel2 As New DataTable Dim ct2 As New OleDb.OleDbDataAdapter ct2 = New OleDb.OleDbDataAdapter("select * from Detailtransaksi", cute) ct2.Fill(datatabel2) dset.Tables.Add(datatabel1) dset.Tables.Add(datatabel2)
Public Class Form22 Dim cute As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\DataTransaksiJualBeli.ACCDB") Dim dset As New DataSet Dim cute1 As New BindingSource Dim cute2 As New BindingSource
Private Sub Form22_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim ct1 As New OleDb.OleDbDataAdapter ct1 = New OleDb.OleDbDataAdapter("select * from Mastertransaksi", cute) ct1.Fill(datatabel1)
Dim datatabel2 As New DataTable Dim ct2 As New OleDb.OleDbDataAdapter ct2 = New OleDb.OleDbDataAdapter("select Detailtransaksi.Notrans, Detailtransaksi.Unit, DetailTransaksi.Harga, Detailtransaksi.Kodebarang, Barang.Namabarang, Detailtransaksi.Unit*Barang.HargaJual AS Jumlahstandar, Detailtransaksi.Unit*Detailtransaksi.Harga AS Jumlahrealisasi from Detailtransaksi INNER JOIN Barang ON Detailtransaksi.Kodebarang=Barang.Kodebarang", cute) ct2.Fill(datatabel2)
Public Class LATIHAN020077 Dim n As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub LATIHAN020077_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim F As New OleDb.OleDbDataAdapter F = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang", n) F.Fill(datatabel1) dvg077.DataSource = datatabel1 End Sub End Class
latihan 21
Public Class LATIHAN021077
Dim n As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim dset As New DataSet 'Deklarasi dataset' Dim Bsource1 As New BindingSource 'Deklarasi bindingsource' Dim Bsource2 As New BindingSource
Private Sub LATIHAN021077_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim B1 As New OleDb.OleDbDataAdapter B1 = New OleDb.OleDbDataAdapter("Select * From MASTERTRANSAKSI", n) B1.Fill(datatabel1)
Dim datatabel2 As New DataTable Dim B2 As New OleDb.OleDbDataAdapter B2 = New OleDb.OleDbDataAdapter("Select * From DETAILTRANSAKSI", n) B2.Fill(datatabel2)
'Memasukkan datatabel dalam dataset' dset.Tables.Add(datatabel1) dset.Tables.Add(datatabel2)
'Menggati nama datatabel dalam dataset' datatabel1.TableName = "T01" datatabel2.TableName = "T02"
'Menambahkan relasi dalam dataset' dset.Relations.Add(New DataRelation("X", dset.Tables("T01").Columns("NOTRANS"), dset.Tables("T02").Columns("NOTRANS")))
'Datasource dan membersource' Bsource1.DataSource = dset Bsource1.DataMember = "T01" Bsource2.DataSource = Bsource1 Bsource2.DataMember = "X"
'Memasukkan datatabel dari bindingsource ke dalam DVG' dvg01.DataSource = Bsource1 dvg02.DataSource = Bsource2 End Sub
Public Class LATIHAN022077 Dim n As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim dset As New DataSet 'Deklarasi dataset' Dim Bsource1 As New BindingSource 'Deklarasi bindingsource' Dim Bsource2 As New BindingSource
Private Sub LATIHAN022077_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datatabel1 As New DataTable Dim B1 As New OleDb.OleDbDataAdapter B1 = New OleDb.OleDbDataAdapter("Select * From MASTERTRANSAKSI", n) B1.Fill(datatabel1)
Dim datatabel2 As New DataTable Dim B2 As New OleDb.OleDbDataAdapter B2 = New OleDb.OleDbDataAdapter("Select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, DETAILTRANSAKSI.KODEBARANG, BARANG.NAMABARANG, DETAILTRANSAKSI.UNIT*BARANG.HARGAJUAL AS JUMLAHSTANDAR, DETAILTRANSAKSI.UNIT*DETAILTRANSAKSI.HARGA AS JUMLAHREALISASI From DETAILTRANSAKSI INNER JOIN BARANG ON DETAILTRANSAKSI.KODEBARANG=BARANG.KODEBARANG", n) B2.Fill(datatabel2)
'Memasukkan datatabel dalam dataset' dset.Tables.Add(datatabel1) dset.Tables.Add(datatabel2)
'Menggati nama datatabel dalam dataset' datatabel1.TableName = "T01" datatabel2.TableName = "T02"
'Menambahkan relasi dalam dataset' dset.Relations.Add(New DataRelation("X", dset.Tables("T01").Columns("NOTRANS"), dset.Tables("T02").Columns("NOTRANS")))
'Datasource dan membersource' Bsource1.DataSource = dset Bsource1.DataMember = "T01" Bsource2.DataSource = Bsource1 Bsource2.DataMember = "X"
'Memasukkan datatabel dari bindingsource ke dalam DVG' dvg01.DataSource = Bsource1 dvg02.DataSource = Bsource2 End Sub End Class
Public Class Form15
BalasHapusDim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub Form15_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim B As New OleDb.OleDbDataAdapter
B = New OleDb.OleDbDataAdapter("Select * from BARANG", A)
B.Fill(datatabel1)
DGV076.DataSource = datatabel1
End Sub
End Class
Public Class Form16
Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub Form16_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim B As New OleDb.OleDbDataAdapter
B = New OleDb.OleDbDataAdapter("Select * from MASTERTRANSAKSI", A)
B.Fill(datatabel1)
DGV076.DataSource = datatabel1
End Sub
End Class
Public Class Form17
Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub Form17_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim B As New OleDb.OleDbDataAdapter
B = New OleDb.OleDbDataAdapter("Select * From DETAILTRANSAKSI", A)
B.Fill(datatabel1)
DGV076.DataSource = datatabel1
End Sub
End Class
Public Class Form18
Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub Form18_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim B As New OleDb.OleDbDataAdapter
B = New OleDb.OleDbDataAdapter("Select BARANG.KODEBARANG, NAMABARANG, DETAILTRANSAKSI.NOTRANS, UNIT, HARGA From DETAILTRANSAKSI INNER JOIN BARANG ON DETAILTRANSAKSI.KODEBARANG=BARANG.KODEBARANG", A)
B.Fill(datatabel1)
DGV076.DataSource = datatabel1
End Sub
End Class
FORM 19 SAMPAI 21
BalasHapusPublic Class Form19
Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub FORM19_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim B As New OleDb.OleDbDataAdapter
B = New OleDb.OleDbDataAdapter("Select MASTERTRANSAKSI.NOTRANS, TANGGALTRANSAKSI, JENISTRANSAKSI, DETAILTRANSAKSI.KODEBARANG, UNIT, HARGA From DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS=MASTERTRANSAKSI.NOTRANS", A)
B.Fill(datatabel1)
DGV076.DataSource = datatabel1
End Sub
End Class
Public Class Form20
Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub FORM20_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim B As New OleDb.OleDbDataAdapter
B = New OleDb.OleDbDataAdapter("Select BARANG.KODEBARANG, BARANG.NAMABARANG, MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA From (DETAILTRANSAKSI INNER JOIN BARANG ON DETAILTRANSAKSI.KODEBARANG=BARANG.KODEBARANG)INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS=MASTERTRANSAKSI.NOTRANS", A)
B.Fill(datatabel1)
DGV076.DataSource = datatabel1
End Sub
End Class
Public Class Form21
Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim dset As New DataSet 'Deklarasi dataset'
Dim Bsource1 As New BindingSource 'Deklarasi bindingsource'
Dim Bsource2 As New BindingSource
Private Sub Form21_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim B1 As New OleDb.OleDbDataAdapter
B1 = New OleDb.OleDbDataAdapter("Select * From MASTERTRANSAKSI", A)
B1.Fill(datatabel1)
Dim datatabel2 As New DataTable
Dim B2 As New OleDb.OleDbDataAdapter
B2 = New OleDb.OleDbDataAdapter("Select * From DETAILTRANSAKSI", A)
B2.Fill(datatabel2)
'Memasukkan datatabel dalam dataset'
dset.Tables.Add(datatabel1)
dset.Tables.Add(datatabel2)
'Menggati nama datatabel dalam dataset'
datatabel1.TableName = "T01"
datatabel2.TableName = "T02"
'Menambahkan relasi dalam dataset'
dset.Relations.Add(New DataRelation("X", dset.Tables("T01").Columns("NOTRANS"), dset.Tables("T02").Columns("NOTRANS")))
'Datasource dan membersource'
Bsource1.DataSource = dset
Bsource1.DataMember = "T01"
Bsource2.DataSource = Bsource1
Bsource2.DataMember = "X"
'Memasukkan datatabel dari bindingsource ke dalam DVG'
DGV076A.DataSource = Bsource1
DGV076B.DataSource = Bsource2
End Sub
End Class
Public Class Form22
BalasHapusDim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim dset As New DataSet 'Deklarasi dataset'
Dim Bsource1 As New BindingSource 'Deklarasi bindingsource'
Dim Bsource2 As New BindingSource
Private Sub Form22_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim B1 As New OleDb.OleDbDataAdapter
B1 = New OleDb.OleDbDataAdapter("Select * From MASTERTRANSAKSI", A)
B1.Fill(datatabel1)
Dim datatabel2 As New DataTable
Dim B2 As New OleDb.OleDbDataAdapter
B2 = New OleDb.OleDbDataAdapter("Select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, DETAILTRANSAKSI.KODEBARANG, BARANG.NAMABARANG, DETAILTRANSAKSI.UNIT*BARANG.HARGAJUAL AS JUMLAHSTANDAR, DETAILTRANSAKSI.UNIT*DETAILTRANSAKSI.HARGA AS JUMLAHREALISASI From DETAILTRANSAKSI INNER JOIN BARANG ON DETAILTRANSAKSI.KODEBARANG=BARANG.KODEBARANG", A)
B2.Fill(datatabel2)
'Memasukkan datatabel dalam dataset'
dset.Tables.Add(datatabel1)
dset.Tables.Add(datatabel2)
'Menggati nama datatabel dalam dataset'
datatabel1.TableName = "T01"
datatabel2.TableName = "T02"
'Menambahkan relasi dalam dataset'
dset.Relations.Add(New DataRelation("X", dset.Tables("T01").Columns("NOTRANS"), dset.Tables("T02").Columns("NOTRANS")))
'Datasource dan membersource'
Bsource1.DataSource = dset
Bsource1.DataMember = "T01"
Bsource2.DataSource = Bsource1
Bsource2.DataMember = "X"
'Memasukkan datatabel dari bindingsource ke dalam DVG'
DGV076A.DataSource = Bsource1
DGV076B.DataSource = Bsource2
End Sub
End Class
Public Class Form15
BalasHapusDim Jalan As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataTransaksijualbeli.ACCDB")
Dim Ember As New DataTable
Private Sub Form15_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Mendeklarasikan kendaraan
Dim mobil As New OleDb.OleDbDataAdapter
'Mengatur data yang akan diangkut
mobil = New OleDb.OleDbDataAdapter("select * from barang", jalan)
'Untuk memasukkan data yang telah diangkut kedalam datatable
mobil.Fill(ember)
'Untuk menampilkan isi datatable ke datagridview
DGV_071.DataSource = ember
mobil.Dispose()
End Sub
End Class
Public Class Form16
BalasHapusDim Jalan As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataTransaksijualbeli.ACCDB")
Dim Ember As New DataTable
Private Sub Form16_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Mendeklarasikan kendaraan
Dim mobil As New OleDb.OleDbDataAdapter
'Mengatur data yang akan diangkut
mobil = New OleDb.OleDbDataAdapter("select * from mastertransaksi", Jalan)
'Untuk memasukkan data yang telah diangkut kedalam datatable
mobil.Fill(Ember)
'Untuk menampilkan isi datatable ke datagridview
DGV_071.DataSource = Ember
mobil.Dispose()
End Sub
End Class
Public Class Form17
BalasHapusDim Jalan As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataTransaksijualbeli.ACCDB")
Dim Ember As New DataTable
Private Sub Form17_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Mendeklarasikan kendaraan
Dim mobil As New OleDb.OleDbDataAdapter
'Mengatur data yang akan diangkut
mobil = New OleDb.OleDbDataAdapter("select * from detailtransaksi", Jalan)
'Untuk memasukkan data yang telah diangkut kedalam datatable
mobil.Fill(Ember)
'Untuk menampilkan isi datatable ke datagridview
DGV_071.DataSource = Ember
mobil.Dispose()
End Sub
End Class
Form 18
Public Class Form18
Dim Jalan As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataTransaksijualbeli.ACCDB")
Dim Ember As New DataTable
Private Sub Form18_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Mendeklarasikan kendaraan
Dim mobil As New OleDb.OleDbDataAdapter
'Mengatur data yang akan diangkut
mobil = New OleDb.OleDbDataAdapter("SELECT barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga FROM BARANG Inner join Detailtransaksi on barang.kodebarang = detailtransaksi.kodebarang", Jalan)
'Untuk memasukkan data yang telah diangkut kedalam datatable
mobil.Fill(Ember)
'Untuk menampilkan isi datatable ke datagridview
DGV_071.DataSource = Ember
mobil.Dispose()
End Sub
End Class
Form19
Public Class Form19
Dim Jalan As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataTransaksijualbeli.ACCDB")
Dim Ember As New DataTable
Private Sub Form19_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Mendeklarasikan kendaraan
Dim mobil As New OleDb.OleDbDataAdapter
'Mengatur data yang akan diangkut
mobil = New OleDb.OleDbDataAdapter("SELECT MAstertransaksi.Notrans, Mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.kodebarang, detailtransaksi.unit, detailtransaksi.harga FROM mastertransaksi Inner join Detailtransaksi on mastertransaksi.notrans = detailtransaksi.notrans", Jalan)
'Untuk memasukkan data yang telah diangkut kedalam datatable
mobil.Fill(Ember)
'Untuk menampilkan isi datatable ke datagridview
DGV_071.DataSource = Ember
mobil.Dispose()
End Sub
End Class
FITRAH ADITYA (36109084)
BalasHapusFORM 15
Public Class latihan_15_084
Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub latihan_15_084_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim B As New OleDb.OleDbDataAdapter
B = New OleDb.OleDbDataAdapter("select * from Barang", A)
B.Fill(datatabel1)
dgv_084.DataSource = datatabel1
End Sub
End Class
FORM 16
Public Class latihan_16_084
Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub latihan_16_084_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim B As New OleDb.OleDbDataAdapter
B = New OleDb.OleDbDataAdapter("select * from MASTERTRANSAKSI", A)
B.Fill(datatabel1)
dgv_084.DataSource = datatabel1
End Sub
End Class
FORM 17
Public Class latihan_17_084
Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub latihan_17_084_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim B As New OleDb.OleDbDataAdapter
B = New OleDb.OleDbDataAdapter("select * from DETAILTRANSAKSI", A)
B.Fill(datatabel1)
dgv_084.DataSource = datatabel1
End Sub
End Class
FORM 18
Public Class latihan_18_084
Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub latihan_18_084_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim B As New OleDb.OleDbDataAdapter
B = New OleDb.OleDbDataAdapter("Select BARANG.KODEBARANG, NAMABARANG, DETAILTRANSAKSI.NOTRANS, UNIT, HARGA From DETAILTRANSAKSI INNER JOIN BARANG ON DETAILTRANSAKSI.KODEBARANG=BARANG.KODEBARANG", A)
B.Fill(datatabel1)
DGV_084.DataSource = datatabel1
End Sub
End Class
FORM 19
BalasHapusPublic Class latihan_19_084
Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub latihan_19_084_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim B As New OleDb.OleDbDataAdapter
B = New OleDb.OleDbDataAdapter("select MASTERTRANSAKSI.NOTRANS,TANGGALTRANSAKSI,JENISTRANSAKSI,DETAILTRANSAKSI.KODEBARANG,UNIT,HARGA from DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS=MASTERTRANSAKSI.NOTRANS", A)
B.Fill(datatabel1)
dgv_084.DataSource = datatabel1
End Sub
End Class
FORM 20
Public Class latihan_20_084
Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub latihan_20_084_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim B As New OleDb.OleDbDataAdapter
B = New OleDb.OleDbDataAdapter("Select BARANG.KODEBARANG, BARANG.NAMABARANG, MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from (DETAILTRANSAKSI INNER JOIN BARANG ON DETAILTRANSAKSI.KODEBARANG=BARANG.KODEBARANG) INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS=MASTERTRANSAKSI.NOTRANS", A)
B.Fill(datatabel1)
dgv_084.DataSource = datatabel1
End Sub
End Class
FORM 21
Public Class latihan_21_084
Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim dset As New DataSet 'Deklarasi dataset'
Dim Bsource1 As New BindingSource 'Deklarasi Bindingsource'
Dim Bsource2 As New BindingSource
Private Sub latihan_21_084_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim B1 As New OleDb.OleDbDataAdapter
B1 = New OleDb.OleDbDataAdapter("select * from MASTERTRANSAKSI", A)
B1.Fill(datatabel1)
Dim datatabel2 As New DataTable
Dim B2 As New OleDb.OleDbDataAdapter
B2 = New OleDb.OleDbDataAdapter("select * from DETAILTRANSAKSI", A)
B2.Fill(datatabel2)
'Memasukkan datatabel dalam dataset'
dset.Tables.Add(datatabel1)
dset.Tables.Add(datatabel2)
'Menggati nama datatabel dalam dataset'
datatabel1.TableName = "T01"
datatabel2.TableName = "T02"
'Menambahkan relasi dalam dataset'
dset.Relations.Add(New DataRelation("X", dset.Tables("T01").Columns("NOTRANS"), dset.Tables("T02").Columns("NOTRANS")))
'Datasource dan membersource'
Bsource1.DataSource = dset
Bsource1.DataMember = "T01"
Bsource2.DataSource = Bsource1
Bsource2.DataMember = "X"
'Memasukkan datatabel dari bindingsource ke dalam DVG'
DGV1_084.DataSource = Bsource1
DGV2_084.DataSource = Bsource2
End Sub
End Class
FORM 22
BalasHapusPublic Class latihan_22_084
Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim dset As New DataSet 'Deklarasi dataset'
Dim Bsource1 As New BindingSource 'Deklarasi bindingsource'
Dim Bsource2 As New BindingSource
Private Sub latihan_22_084_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim B1 As New OleDb.OleDbDataAdapter
B1 = New OleDb.OleDbDataAdapter("Select * From MASTERTRANSAKSI", A)
B1.Fill(datatabel1)
Dim datatabel2 As New DataTable
Dim B2 As New OleDb.OleDbDataAdapter
B2 = New OleDb.OleDbDataAdapter("Select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, DETAILTRANSAKSI.KODEBARANG, BARANG.NAMABARANG, DETAILTRANSAKSI.UNIT*BARANG.HARGAJUAL AS JUMLAHSTANDAR, DETAILTRANSAKSI.UNIT*DETAILTRANSAKSI.HARGA AS JUMLAHREALISASI From DETAILTRANSAKSI INNER JOIN BARANG ON DETAILTRANSAKSI.KODEBARANG=BARANG.KODEBARANG", A)
B2.Fill(datatabel2)
'Memasukkan datatabel dalam dataset'
dset.Tables.Add(datatabel1)
dset.Tables.Add(datatabel2)
'Menggati nama datatabel dalam dataset'
datatabel1.TableName = "T01"
datatabel2.TableName = "T02"
'Menambahkan relasi dalam dataset'
dset.Relations.Add(New DataRelation("X", dset.Tables("T01").Columns("NOTRANS"), dset.Tables("T02").Columns("NOTRANS")))
'Datasource dan membersource'
Bsource1.DataSource = dset
Bsource1.DataMember = "T01"
Bsource2.DataSource = Bsource1
Bsource2.DataMember = "X"
'Memasukkan datatabel dari bindingsource ke dalam DVG'
dgv1_084.DataSource = Bsource1
dgv2_084.DataSource = Bsource2
End Sub
End Class
feby winriani syam (361 09 064)
BalasHapusFORM 15
Public Class latihan_15_064
Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub Latihan15017_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim B As New OleDb.OleDbDataAdapter
B = New OleDb.OleDbDataAdapter("Select * from BARANG", A)
B.Fill(datatabel1)
DataGridView_064.DataSource = datatabel1
End Sub
End Class
FORM 16
Public Class latihan_16_064
Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub latihan_16_064_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim B As New OleDb.OleDbDataAdapter
B = New OleDb.OleDbDataAdapter("Select * from MASTERTRANSAKSI", A)
B.Fill(datatabel1)
DataGridView_064.DataSource = datatabel1
End Sub
End Class
FORM 17
Public Class latihan_17_064
Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub latihan_17_064_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim B As New OleDb.OleDbDataAdapter
B = New OleDb.OleDbDataAdapter("Select * from DETAILTRANSAKSI", A)
B.Fill(datatabel1)
DataGridView_064.DataSource = datatabel1
End Sub
End Class
FORM 18
Public Class latihan_18_064
Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub latihan_18_064_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim B As New OleDb.OleDbDataAdapter
B = New OleDb.OleDbDataAdapter("select BARANG.KODEBARANG,NAMABARANG,DETAILTRANSAKSI.NOTRANS,UNIT,HARGA FROM DETAILTRANSAKSI INNER JOIN BARANG ON DETAILTRANSAKSI.KODEBARANG=BARANG.KODEBARANG", A)
B.Fill(datatabel1)
DataGridView_064.DataSource = datatabel1
End Sub
End Class
FORM 22
BalasHapus\Public Class latihan_22_064
Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim dset As New DataSet 'Deklarasi dataset'
Dim Bsource1 As New BindingSource 'Deklarasi bindingsource'
Dim Bsource2 As New BindingSource
Private Sub latihan_22_064_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim B1 As New OleDb.OleDbDataAdapter
B1 = New OleDb.OleDbDataAdapter("Select * From MASTERTRANSAKSI", A)
B1.Fill(datatabel1)
Dim datatabel2 As New DataTable
Dim B2 As New OleDb.OleDbDataAdapter
B2 = New OleDb.OleDbDataAdapter("Select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, DETAILTRANSAKSI.KODEBARANG, BARANG.NAMABARANG, DETAILTRANSAKSI.UNIT*BARANG.HARGAJUAL AS JUMLAHSTANDAR, DETAILTRANSAKSI.UNIT*DETAILTRANSAKSI.HARGA AS JUMLAHREALISASI From DETAILTRANSAKSI INNER JOIN BARANG ON DETAILTRANSAKSI.KODEBARANG=BARANG.KODEBARANG", A)
B2.Fill(datatabel2)
'Memasukkan datatabel dalam dataset'
dset.Tables.Add(datatabel1)
dset.Tables.Add(datatabel2)
'Menggati nama datatabel dalam dataset'
datatabel1.TableName = "T01"
datatabel2.TableName = "T02"
'Menambahkan relasi dalam dataset'
dset.Relations.Add(New DataRelation("X", dset.Tables("T01").Columns("NOTRANS"), dset.Tables("T02").Columns("NOTRANS")))
'Datasource dan membersource'
Bsource1.DataSource = dset
Bsource1.DataMember = "T01"
Bsource2.DataSource = Bsource1
Bsource2.DataMember = "X"
'Memasukkan datatabel dari bindingsource ke dalam DVG'
DataGridView_1064.DataSource = Bsource1
DataGridView_2064.DataSource = Bsource2
End Sub
End Class
FORM 19-21
BalasHapusFORM 19
Public Class latihan_19_064
Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub latihan_19_064_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim B As New OleDb.OleDbDataAdapter
B = New OleDb.OleDbDataAdapter("select MASTERTRANSAKSI.NOTRANS, TANGGALTRANSAKSI, JENISTRANSAKSI, DETAILTRANSAKSI.KODEBARANG, UNIT, HARGA From DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS=MASTERTRANSAKSI.NOTRANS", A)
B.Fill(datatabel1)
DataGridView_064.DataSource = datatabel1
End Sub
End Class
FORM 20
Public Class latihan_20_064
Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub latihan_20_026_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim B As New OleDb.OleDbDataAdapter
B = New OleDb.OleDbDataAdapter("Select BARANG.KODEBARANG, BARANG.NAMABARANG, MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA From (DETAILTRANSAKSI INNER JOIN BARANG ON DETAILTRANSAKSI.KODEBARANG=BARANG.KODEBARANG)INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS=MASTERTRANSAKSI.NOTRANS", A)
B.Fill(datatabel1)
DataGridView_064.DataSource = datatabel1
End Sub
End Class
FORM 21
Public Class latihan_21_064
Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim dset As New DataSet 'Deklarasi dataset'
Dim Bsource1 As New BindingSource 'Deklarasi bindingsource'
Dim Bsource2 As New BindingSource
Private Sub latihan_21_064_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim B1 As New OleDb.OleDbDataAdapter
B1 = New OleDb.OleDbDataAdapter("Select * From MASTERTRANSAKSI", A)
B1.Fill(datatabel1)
Dim datatabel2 As New DataTable
Dim B2 As New OleDb.OleDbDataAdapter
B2 = New OleDb.OleDbDataAdapter("Select * From DETAILTRANSAKSI", A)
B2.Fill(datatabel2)
'Memasukkan datatabel dalam dataset'
dset.Tables.Add(datatabel1)
dset.Tables.Add(datatabel2)
'Menggati nama datatabel dalam dataset'
datatabel1.TableName = "T01"
datatabel2.TableName = "T02"
'Menambahkan relasi dalam dataset'
dset.Relations.Add(New DataRelation("X", dset.Tables("T01").Columns("NOTRANS"), dset.Tables("T02").Columns("NOTRANS")))
'Datasource dan membersource'
Bsource1.DataSource = dset
Bsource1.DataMember = "T01"
Bsource2.DataSource = Bsource1
Bsource2.DataMember = "X"
'Memasukkan datatabel dari bindingsource ke dalam DVG'
DataGridView_1064.DataSource = Bsource1
DataGridView_2064.DataSource = Bsource2
End Sub
End Class
Komentar ini telah dihapus oleh pengarang.
BalasHapusKomentar ini telah dihapus oleh pengarang.
BalasHapusKomentar ini telah dihapus oleh pengarang.
BalasHapusPublic Class latihan15
BalasHapusDim danang As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub latihan15_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim prayudha As New OleDb.OleDbDataAdapter
prayudha = New OleDb.OleDbDataAdapter("Select * from BARANG", danang)
prayudha.Fill(datatabel1)
dgv069.DataSource = datatabel1
prayudha.Dispose()
End Sub
End Class
Public Class latihan_16_069
Dim danang As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub latihan_16_069_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim yudha As New OleDb.OleDbDataAdapter
yudha = New OleDb.OleDbDataAdapter("Select * from MASTERTRANSAKSI", danang)
yudha.Fill(datatabel1)
dgv.DataSource = datatabel1
End Sub
End Class
Public Class latihan_17_069
Dim danang As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub latihan_17_069_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim prayudha As New DataTable
Dim B As New OleDb.OleDbDataAdapter
B = New OleDb.OleDbDataAdapter("Select * From DETAILTRANSAKSI", danang)
B.Fill(prayudha)
dgv069.DataSource = prayudha
End Sub
End Class
Public Class latihan_18_069
BalasHapusDim danang As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub latihan_18_069_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim prayudha As New DataTable
Dim B As New OleDb.OleDbDataAdapter
B = New OleDb.OleDbDataAdapter("Select BARANG.KODEBARANG, NAMABARANG, DETAILTRANSAKSI.NOTRANS, UNIT, HARGA From DETAILTRANSAKSI INNER JOIN BARANG ON DETAILTRANSAKSI.KODEBARANG=BARANG.KODEBARANG", danang)
B.Fill(prayudha)
dgv.DataSource = prayudha
End Sub
End Class
Public Class latihan_19_069
Dim danang As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub latihan_19_069_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim prayudha As New DataTable
Dim B As New OleDb.OleDbDataAdapter
B = New OleDb.OleDbDataAdapter("Select MASTERTRANSAKSI.NOTRANS, TANGGALTRANSAKSI, JENISTRANSAKSI, DETAILTRANSAKSI.KODEBARANG, UNIT, HARGA From DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS=MASTERTRANSAKSI.NOTRANS", danang)
B.Fill(prayudha)
dgv.DataSource = prayudha
End Sub
End Class
Public Class latihan_20_069
Dim danang As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub latihan_20_069_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim prayudha As New DataTable
Dim dwi As New OleDb.OleDbDataAdapter
dwi = New OleDb.OleDbDataAdapter("Select BARANG.KODEBARANG, BARANG.NAMABARANG, MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA From (DETAILTRANSAKSI INNER JOIN BARANG ON DETAILTRANSAKSI.KODEBARANG=BARANG.KODEBARANG)INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS=MASTERTRANSAKSI.NOTRANS", danang)
dwi.Fill(prayudha)
DataGridView1.DataSource = prayudha
End Sub
End Class
Public Class latihan_21_069
BalasHapusDim danang As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim dset As New DataSet 'Deklarasi dataset'
Dim Bsource1 As New BindingSource 'Deklarasi bindingsource'
Dim Bsource2 As New BindingSource
Private Sub latihan_21_069_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim B1 As New OleDb.OleDbDataAdapter
B1 = New OleDb.OleDbDataAdapter("Select * From MASTERTRANSAKSI", danang)
B1.Fill(datatabel1)
Dim datatabel2 As New DataTable
Dim B2 As New OleDb.OleDbDataAdapter
B2 = New OleDb.OleDbDataAdapter("Select * From DETAILTRANSAKSI", danang)
B2.Fill(datatabel2)
'Memasukkan datatabel dalam dataset'
dset.Tables.Add(datatabel1)
dset.Tables.Add(datatabel2)
'Menggati nama datatabel dalam dataset'
datatabel1.TableName = "T01"
datatabel2.TableName = "T02"
'Menambahkan relasi dalam dataset'
dset.Relations.Add(New DataRelation("X", dset.Tables("T01").Columns("NOTRANS"), dset.Tables("T02").Columns("NOTRANS")))
'Datasource dan membersource'
Bsource1.DataSource = dset
Bsource1.DataMember = "T01"
Bsource2.DataSource = Bsource1
Bsource2.DataMember = "X"
'Memasukkan datatabel dari bindingsource ke dalam DVG'
dgv.DataSource = Bsource1
dgv2.DataSource = Bsource2
End Sub
End Class
Public Class latihan_22_069
Dim danang As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim dset As New DataSet 'Deklarasi dataset'
Dim Bsource1 As New BindingSource 'Deklarasi bindingsource'
Dim Bsource2 As New BindingSource
Private Sub latihan_22_069_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim prayudha As New DataTable
Dim B1 As New OleDb.OleDbDataAdapter
B1 = New OleDb.OleDbDataAdapter("Select * From MASTERTRANSAKSI", danang)
B1.Fill(prayudha)
Dim prayudha2 As New DataTable
Dim B2 As New OleDb.OleDbDataAdapter
B2 = New OleDb.OleDbDataAdapter("Select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, DETAILTRANSAKSI.KODEBARANG, BARANG.NAMABARANG, DETAILTRANSAKSI.UNIT*BARANG.HARGAJUAL AS JUMLAHSTANDAR, DETAILTRANSAKSI.UNIT*DETAILTRANSAKSI.HARGA AS JUMLAHREALISASI From DETAILTRANSAKSI INNER JOIN BARANG ON DETAILTRANSAKSI.KODEBARANG=BARANG.KODEBARANG", danang)
B2.Fill(prayudha2)
'Memasukkan datatabel dalam dataset'
dset.Tables.Add(prayudha)
dset.Tables.Add(prayudha2)
'Menggati nama datatabel dalam dataset'
prayudha.TableName = "T01"
prayudha2.TableName = "T02"
'Menambahkan relasi dalam dataset'
dset.Relations.Add(New DataRelation("X", dset.Tables("T01").Columns("NOTRANS"), dset.Tables("T02").Columns("NOTRANS")))
'Datasource dan membersource'
Bsource1.DataSource = dset
Bsource1.DataMember = "T01"
Bsource2.DataSource = Bsource1
Bsource2.DataMember = "X"
'Memasukkan datatabel dari bindingsource ke dalam DVG'
dgv.DataSource = Bsource1
dgv2.DataSource = Bsource2
End Sub
End Class
Komentar ini telah dihapus oleh pengarang.
BalasHapusKomentar ini telah dihapus oleh pengarang.
BalasHapusKomentar ini telah dihapus oleh pengarang.
BalasHapusKomentar ini telah dihapus oleh pengarang.
BalasHapusKomentar ini telah dihapus oleh pengarang.
BalasHapusPublic Class Latihan15
BalasHapusDim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub Latihan15_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim B As New OleDb.OleDbDataAdapter
B = New OleDb.OleDbDataAdapter("Select * from barang", A)
B.Fill(datatabel1)
dgv070.DataSource = datatabel1
End Sub
End Class
Public Class Latihan16
Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub Latihan16_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim B As New OleDb.OleDbDataAdapter
B = New OleDb.OleDbDataAdapter("Select * from Mastertransaksi", A)
B.Fill(datatabel1)
dgv070.DataSource = datatabel1
End Sub
End Class
Public Class Latihan17
Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub Latihan17_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim B As New OleDb.OleDbDataAdapter
B = New OleDb.OleDbDataAdapter("Select * from Detailtransaksi", A)
B.Fill(datatabel1)
Dgv070.DataSource = datatabel1
End Sub
End Class
Public Class Latihan18
BalasHapusDim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub Latihan18_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim B As New OleDb.OleDbDataAdapter
B = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang", A)
B.Fill(datatabel1)
dgv070.DataSource = datatabel1
End Sub
End Class
Public Class Latihan19
Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub Latihan19_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim B As New OleDb.OleDbDataAdapter
B = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.kodebarang, detailtransaksi.unit, detailtransaksi.harga from mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans", A)
B.Fill(datatabel1)
dgv070.DataSource = datatabel1
End Sub
End Class
Public Class Latihan20
Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub Latihan20_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim B As New OleDb.OleDbDataAdapter
B = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang", A)
B.Fill(datatabel1)
dgv070.DataSource = datatabel1
End Sub
End Class
Komentar ini telah dihapus oleh pengarang.
BalasHapusKomentar ini telah dihapus oleh pengarang.
BalasHapusPublic Class Latihan21
BalasHapusDim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim dset As New DataSet 'Deklarasi dataset'
Dim Bsource1 As New BindingSource 'Deklarasi bindingsource'
Dim Bsource2 As New BindingSource
Private Sub Latihan21_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim B1 As New OleDb.OleDbDataAdapter
B1 = New OleDb.OleDbDataAdapter("Select * From Mastertransaksi", A)
B1.Fill(datatabel1)
Dim datatabel2 As New DataTable
Dim B2 As New OleDb.OleDbDataAdapter
B2 = New OleDb.OleDbDataAdapter("Select * From detailtransaksi", A)
B2.Fill(datatabel2)
'Memasukkan datatabel dalam dataset'
dset.Tables.Add(datatabel1)
dset.Tables.Add(datatabel2)
'Menggati nama datatabel dalam dataset'
datatabel1.TableName = "T01"
datatabel2.TableName = "T02"
'Menambahkan relasi dalam dataset'
dset.Relations.Add(New DataRelation("X", dset.Tables("T01").Columns("notrans"), dset.Tables("T02").Columns("notrans")))
'Datasource dan membersource'
Bsource1.DataSource = dset
Bsource1.DataMember = "T01"
Bsource2.DataSource = Bsource1
Bsource2.DataMember = "X"
'Memasukkan datatabel dari bindingsource ke dalam DVG'
dgv1070.DataSource = Bsource1
dgv2070.DataSource = Bsource2
End Sub
End Class
Public Class Latihan22
Dim A As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim dset As New DataSet 'Deklarasi dataset'
Dim Bsource1 As New BindingSource 'Deklarasi bindingsource'
Dim Bsource2 As New BindingSource
Private Sub Latihan22_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim B1 As New OleDb.OleDbDataAdapter
B1 = New OleDb.OleDbDataAdapter("Select * From MASTERTRANSAKSI", A)
B1.Fill(datatabel1)
Dim datatabel2 As New DataTable
Dim B2 As New OleDb.OleDbDataAdapter
B2 = New OleDb.OleDbDataAdapter("Select detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga, detailtransaksi.kodebarang, barang.namabarang, detailtransaksi.unit*barang.hargajual as jumlahstandart, detailtransaksi.unit*detailtransaksi.harga as jumlahrealisasi From detailtransaksi inner join barang on detailtransaksi.kodebarang=barang.kodebarang", A)
B2.Fill(datatabel2)
'Memasukkan datatabel dalam dataset'
dset.Tables.Add(datatabel1)
dset.Tables.Add(datatabel2)
'Menggati nama datatabel dalam dataset'
datatabel1.TableName = "T01"
datatabel2.TableName = "T02"
'Menambahkan relasi dalam dataset'
dset.Relations.Add(New DataRelation("X", dset.Tables("T01").Columns("notrans"), dset.Tables("T02").Columns("notrans")))
'Datasource dan membersource'
Bsource1.DataSource = dset
Bsource1.DataMember = "T01"
Bsource2.DataSource = Bsource1
Bsource2.DataMember = "X"
'Memasukkan datatabel dari bindingsource ke dalam DVG'
dgv1070.DataSource = Bsource1
dgv2070.DataSource = Bsource2
End Sub
End Class
Komentar ini telah dihapus oleh pengarang.
BalasHapusKomentar ini telah dihapus oleh pengarang.
BalasHapusKomentar ini telah dihapus oleh pengarang.
BalasHapusPublic Class Form15
BalasHapusDim caca As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataTransaksiJualBeli.ACCDB")
Private Sub Form15_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cece As New OleDb.OleDbDataAdapter
Dim cici As New DataTable
cece = New OleDb.OleDbDataAdapter("select * from barang", caca)
cece.Fill(cici)
Dgv1.DataSource = cici
cece.Dispose()
End Sub
End Class
Public Class Form16
Dim caca As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataTransaksiJualBeli.ACCDB")
Dim cici As New DataTable
Private Sub Form16_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cece As New OleDb.OleDbDataAdapter
cece = New OleDb.OleDbDataAdapter("select * from mastertransaksi", caca)
cece.Fill(cici)
Dgv2().DataSource = cici
cece.Dispose()
End Sub
End Class
Public Class Form17
Dim caca As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataTransaksiJUalBeli.ACCDB")
Dim cici As New DataTable
Private Sub Form17_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cece As New OleDb.OleDbDataAdapter
cece = New OleDb.OleDbDataAdapter("select * from detailtransaksi", caca)
cece.Fill(cici)
DataGridView1.DataSource = cici
cece.Dispose()
End Sub
End Class
Public Class Form18
Dim caca As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataTransaksiJualBeli.ACCDB")
Dim cici As New DataTable
Private Sub Form18_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cece As New OleDb.OleDbDataAdapter
cece = New OleDb.OleDbDataAdapter("Select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from Barang inner join Detailtransaksi on barang.kodebarang = detailtransaksi.kodebarang", caca)
cece.Fill(cici)
DataGridView1.DataSource = cici
cece.Dispose()
End Sub
End Class
Public Class Form19
BalasHapusDim caca As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataTransaksiJualBeli.ACCDB")
Dim cici As New DataTable
Private Sub Form19_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cece As New OleDb.OleDbDataAdapter
cece = New OleDb.OleDbDataAdapter("Select Mastertransaksi.Notrans, Mastertransaksi.tanggaltransaksi, Mastertransaksi.jenistransaksi, detailtransaksi.kodebarang,detailtransaksi.unit, detailtransaksi.harga from mastertransaksi Inner Join Detailtransaksi on mastertransaksi.notrsans = detailtransaksi.notrans", caca)
cece.Fill(cici)
DataGridView1.DataSource = cici
cece.Dispose()
End Sub
End Class
Public Class Form20
Dim caca As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataTransaksiJualBeli.ACCDB")
Dim cici As New DataTable
Private Sub Form20_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cece As New OleDb.OleDbDataAdapter
cece = New OleDb.OleDbDataAdapter("Select Barang.Kodebarang, Barang.Namabarang,MasterTransaksi.Notrans, MasterTransaksi.Tanggaltansaksi, Mastertransaksi.JenisTransaksi, Detailtransaksi.Unit, Detailtransaksi.Harga from (Detailtransaksi Inner Join Barang on Detailtransaksi.Kodebarang = Barang.Kodebarang) Inner Join Mastertransaksi on Detailtransaksi.Notrans = Mastertransaksi.Notrans", caca)
cece.Fill(cici)
DataGridView1.DataSource = cici
cece.Dispose()
End Sub
End Class
Public Class Form21
Dim cute As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\Datatransaksijualbeli.ACCDB")
Dim dset As New DataSet
Dim cute1 As New BindingSource
Dim cute2 As New BindingSource
Private Sub Form21_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim ct1 As New OleDb.OleDbDataAdapter
ct1 = New OleDb.OleDbDataAdapter("select * from Mastertransaksi", cute)
ct1.Fill(datatabel1)
Dim datatabel2 As New DataTable
Dim ct2 As New OleDb.OleDbDataAdapter
ct2 = New OleDb.OleDbDataAdapter("select * from Detailtransaksi", cute)
ct2.Fill(datatabel2)
dset.Tables.Add(datatabel1)
dset.Tables.Add(datatabel2)
datatabel1.TableName = "C01"
datatabel2.TableName = "C02"
dset.Relations.Add(New DataRelation("X", dset.Tables("C01").Columns("Notrans"), dset.Tables("C02").Columns("Notrans")))
cute1.DataSource = dset
cute1.DataMember = "C01"
cute2.DataSource = cute1
cute2.DataMember = "X"
Dgv1.DataSource = cute1
Dgv2.DataSource = cute2
End Sub
End Class
Public Class Form22
BalasHapusDim cute As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\DataTransaksiJualBeli.ACCDB")
Dim dset As New DataSet
Dim cute1 As New BindingSource
Dim cute2 As New BindingSource
Private Sub Form22_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim ct1 As New OleDb.OleDbDataAdapter
ct1 = New OleDb.OleDbDataAdapter("select * from Mastertransaksi", cute)
ct1.Fill(datatabel1)
Dim datatabel2 As New DataTable
Dim ct2 As New OleDb.OleDbDataAdapter
ct2 = New OleDb.OleDbDataAdapter("select Detailtransaksi.Notrans, Detailtransaksi.Unit, DetailTransaksi.Harga, Detailtransaksi.Kodebarang, Barang.Namabarang, Detailtransaksi.Unit*Barang.HargaJual AS Jumlahstandar, Detailtransaksi.Unit*Detailtransaksi.Harga AS Jumlahrealisasi from Detailtransaksi INNER JOIN Barang ON Detailtransaksi.Kodebarang=Barang.Kodebarang", cute)
ct2.Fill(datatabel2)
dset.Tables.Add(datatabel1)
dset.Tables.Add(datatabel2)
datatabel1.TableName = "C01"
datatabel2.TableName = "C02"
dset.Relations.Add(New DataRelation("X", dset.Tables("C01").Columns("Notrans"), dset.Tables("C02").Columns("Notrans")))
cute1.DataSource = dset
cute1.DataMember = "C01"
cute2.DataSource = dset
cute2.DataMember = "X"
Dgv1.DataSource = cute1
Dgv2.DataSource = cute2
End Sub
End Class
latihan 20
BalasHapusPublic Class LATIHAN020077
Dim n As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub LATIHAN020077_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim F As New OleDb.OleDbDataAdapter
F = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang", n)
F.Fill(datatabel1)
dvg077.DataSource = datatabel1
End Sub
End Class
latihan 21
Public Class LATIHAN021077
Dim n As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim dset As New DataSet 'Deklarasi dataset'
Dim Bsource1 As New BindingSource 'Deklarasi bindingsource'
Dim Bsource2 As New BindingSource
Private Sub LATIHAN021077_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim B1 As New OleDb.OleDbDataAdapter
B1 = New OleDb.OleDbDataAdapter("Select * From MASTERTRANSAKSI", n)
B1.Fill(datatabel1)
Dim datatabel2 As New DataTable
Dim B2 As New OleDb.OleDbDataAdapter
B2 = New OleDb.OleDbDataAdapter("Select * From DETAILTRANSAKSI", n)
B2.Fill(datatabel2)
'Memasukkan datatabel dalam dataset'
dset.Tables.Add(datatabel1)
dset.Tables.Add(datatabel2)
'Menggati nama datatabel dalam dataset'
datatabel1.TableName = "T01"
datatabel2.TableName = "T02"
'Menambahkan relasi dalam dataset'
dset.Relations.Add(New DataRelation("X", dset.Tables("T01").Columns("NOTRANS"), dset.Tables("T02").Columns("NOTRANS")))
'Datasource dan membersource'
Bsource1.DataSource = dset
Bsource1.DataMember = "T01"
Bsource2.DataSource = Bsource1
Bsource2.DataMember = "X"
'Memasukkan datatabel dari bindingsource ke dalam DVG'
dvg01.DataSource = Bsource1
dvg02.DataSource = Bsource2
End Sub
End Class
latihan 22
BalasHapusPublic Class LATIHAN022077
Dim n As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim dset As New DataSet 'Deklarasi dataset'
Dim Bsource1 As New BindingSource 'Deklarasi bindingsource'
Dim Bsource2 As New BindingSource
Private Sub LATIHAN022077_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatabel1 As New DataTable
Dim B1 As New OleDb.OleDbDataAdapter
B1 = New OleDb.OleDbDataAdapter("Select * From MASTERTRANSAKSI", n)
B1.Fill(datatabel1)
Dim datatabel2 As New DataTable
Dim B2 As New OleDb.OleDbDataAdapter
B2 = New OleDb.OleDbDataAdapter("Select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, DETAILTRANSAKSI.KODEBARANG, BARANG.NAMABARANG, DETAILTRANSAKSI.UNIT*BARANG.HARGAJUAL AS JUMLAHSTANDAR, DETAILTRANSAKSI.UNIT*DETAILTRANSAKSI.HARGA AS JUMLAHREALISASI From DETAILTRANSAKSI INNER JOIN BARANG ON DETAILTRANSAKSI.KODEBARANG=BARANG.KODEBARANG", n)
B2.Fill(datatabel2)
'Memasukkan datatabel dalam dataset'
dset.Tables.Add(datatabel1)
dset.Tables.Add(datatabel2)
'Menggati nama datatabel dalam dataset'
datatabel1.TableName = "T01"
datatabel2.TableName = "T02"
'Menambahkan relasi dalam dataset'
dset.Relations.Add(New DataRelation("X", dset.Tables("T01").Columns("NOTRANS"), dset.Tables("T02").Columns("NOTRANS")))
'Datasource dan membersource'
Bsource1.DataSource = dset
Bsource1.DataMember = "T01"
Bsource2.DataSource = Bsource1
Bsource2.DataMember = "X"
'Memasukkan datatabel dari bindingsource ke dalam DVG'
dvg01.DataSource = Bsource1
dvg02.DataSource = Bsource2
End Sub
End Class