Public Class Form2036108001 Dim Ince As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source= " & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim Aulia As New DataTable Private Sub Form2036108001_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim Akhriani As New OleDb.OleDbDataAdapter Akhriani = 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", Ince) Akhriani.Fill(Aulia) DGV36108001.DataSource = Aulia End Sub End Class
Public Class Form2136108001 Dim Ince As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source= " & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim Aulia As New DataTable Dim Dulina As New DataTable Dim Arhy As New DataSet Dim Egiet As New BindingSource Dim Ayi As New BindingSource Private Sub Form2136108001_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim Akhriani As New OleDb.OleDbDataAdapter Dim Anhye As New OleDb.OleDbDataAdapter Akhriani = New OleDb.OleDbDataAdapter("select * from mastertransaksi", Ince) Akhriani.Fill(Aulia) Anhye = New OleDb.OleDbDataAdapter("select * from detailtransaksi", Ince) Anhye.Fill(Dulina) Aulia.TableName = "induknya" Dulina.TableName = "anaknya" Arhy.Tables.Add(Aulia) Arhy.Tables.Add(Dulina) Arhy.Relations.Add(New DataRelation("Akhriani", Arhy.Tables("induknya").Columns("notrans"), Arhy.Tables("anaknya").Columns("notrans"))) Egiet.DataSource = Arhy Egiet.DataMember = "induknya" Ayi.DataSource = Egiet Ayi.DataMember = "Akhriani" DGV136108001.DataSource = Egiet DGV236108001.DataSource = Ayi End Sub End Class
Public Class Form2236108001 Dim Ince As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source= " & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim Aulia As New DataTable Dim Dulina As New DataTable Dim Arhy As New DataSet Dim Egiet As New BindingSource Dim Ayi As New BindingSource Private Sub Form2236108001_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim Akhriani As New OleDb.OleDbDataAdapter Dim Anhye As New OleDb.OleDbDataAdapter Akhriani = New OleDb.OleDbDataAdapter("select * from barang", Ince) Akhriani.Fill(Aulia) Anhye = New OleDb.OleDbDataAdapter("select * from detailtransaksi", Ince) Anhye.Fill(Dulina) Aulia.TableName = "induknya" Dulina.TableName = "anaknya" Arhy.Tables.Add(Aulia) Arhy.Tables.Add(Dulina) Arhy.Relations.Add(New DataRelation("Akhriani", Arhy.Tables("induknya").Columns("kodebarang"), Arhy.Tables("anaknya").Columns("kodebarang"))) Egiet.DataSource = Arhy Egiet.DataMember = "induknya" Ayi.DataSource = Egiet Ayi.DataMember = "Akhriani" DGV136108001.DataSource = Egiet DGV236108001.DataSource = Ayi End Sub End Class
Public Class Form1536109050 Dim conect As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim uni As New DataTable Private Sub Form1536109050_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select*from barang", conect) adapter.Fill(uni) DataGridView1.DataSource = uni End Sub End Class
Public Class Form1636109050 Dim conect As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim uni As New DataTable Private Sub Form1636109050_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select*from mastertransaksi", conect) adapter.Fill(uni) DataGridView1.DataSource = uni End Sub End Class
Public Class Form1736109050 Dim conect As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim uni As New DataTable Private Sub Form1736109050_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select*from detailtransaksi", conect) adapter.Fill(uni) DataGridView1.DataSource = uni End Sub End Class
Public Class Form1836109050 Dim conect As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim uni As New DataTable Private Sub Form1836109050_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang", conect) adapter.Fill(uni) DataGridView1.DataSource = uni End Sub End Class
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Icha As New DataTable
Private Sub LATIHAN01536109038_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim adapter As OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("Select*from barang", CONECT) adapter.Fill(Icha) DataGridView136109038.DataSource = Icha End Sub End Class
Public Class LATIHAN01636109038 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Icha As New DataTable
Private Sub LATIHAN01636109038_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim adapter As OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("Select*from mastertransaksi", CONECT) adapter.Fill(Icha) DataGridView136109038.DataSource = Icha End Sub End Class
Public Class LATIHAN01736109038 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Icha As New DataTable
Private Sub LATIHAN01736109038_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim adapter As OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("Select*from detailtransaksi", CONECT) adapter.Fill(Icha) DataGridView136109038.DataSource = Icha End Sub End Class
Public Class LATIHAN01736109038 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Icha As New DataTable
Private Sub LATIHAN01736109038_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim adapter As OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("Select*from detailtransaksi", CONECT) adapter.Fill(Icha) DataGridView136109038.DataSource = Icha End Sub End Class
Public Class LATIHAN01836109038 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Icha As New DataTable
Private Sub LATIHAN01836109038_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim adapter As OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang", CONECT) adapter.Fill(Icha) DataGridView136109038.DataSource = Icha End Sub End Class
Latihan_15_36109056 Public Class latihan_15_36109056 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim biya As New DataTable
Private Sub latihan_15_36109056_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select*from BARANG", CONECT) adapter.Fill(biya) DataGridView1.DataSource = biya End Sub End Class
Latihan_16_36109056 Public Class latihan_16_36109056 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim biya As New DataTable Private Sub latihan_16_36109056_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", CONECT) adapter.Fill(biya) DataGridView1.DataSource = biya End Sub End Class
Latihan_17_36109056 Public Class latihan_17_36109056 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim biya As New DataTable Private Sub latihan_17_36109056_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", CONECT) adapter.Fill(biya) DataGridView1.DataSource = biya End Sub End Class
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Firah As New DataTable
Private Sub LATIHAN1536109044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim Adapter As OleDb.OleDbDataAdapter Adapter = New OleDb.OleDbDataAdapter("select * from barang", CONECT) Adapter.Fill(Firah) DataGridView136109044.DataSource = Firah
End Sub
Private Sub DataGridView136109044_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView136109044.CellContentClick
End Sub End Class
Public Class Latihan1636109044
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Firah As New DataTable
Private Sub Latihan1636109044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim Adapter As OleDb.OleDbDataAdapter Adapter = New OleDb.OleDbDataAdapter("select * from mastertransaksi", CONECT) Adapter.Fill(Firah) DataGridView136109044.DataSource = Firah End Sub
Private Sub DataGridView136109044_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView136109044.CellContentClick
End Sub End Class
Public Class Latihan1736109044
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Firah As New DataTable
Private Sub Latihan1736109044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim Adapter As OleDb.OleDbDataAdapter Adapter = New OleDb.OleDbDataAdapter("select * from detailtransaksi", CONECT) Adapter.Fill(Firah) DataGridView136109044.DataSource = Firah End Sub
Private Sub DataGridView136109044_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView136109044.CellContentClick
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Firah As New DataTable
Private Sub Latihan1836109044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim Adapter As OleDb.OleDbDataAdapter Adapter = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang", CONECT) Adapter.Fill(Firah) DataGridView136109044.DataSource = Firah End Sub
Private Sub DataGridView136109044_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView136109044.CellContentClick
End Sub End Class
Public Class Latihan1936109044
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Firah As New DataTable
Private Sub Latihan1936109044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim Adapter As OleDb.OleDbDataAdapter Adapter = 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", CONECT) Adapter.Fill(Firah) DataGridView136109044.DataSource = Firah
End Sub End Class
Public Class Latihan2036109044
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Firah As New DataTable
Private Sub Latihan2036109044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim Adapter As OleDb.OleDbDataAdapter Adapter = 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", CONECT) Adapter.Fill(Firah) DataGridView136109044.DataSource = Firah
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim firah As New DataTable Dim magfirah As New DataTable Dim datset As New DataSet Dim bin As New BindingSource Dim bin2 As New BindingSource Private Sub latihan2136109044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter Dim cobaji2 As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", conect) cobaji.Fill(firah) cobaji2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", conect) cobaji2.Fill(magfirah) firah.TableName = "induknya" magfirah.TableName = ("anaknya") datset.Tables.Add(firah) datset.Tables.Add(magfirah) datset.Relations.Add(New DataRelation("cobaji", datset.Tables("induknya").Columns("NOTRANS"), datset.Tables("anaknya").Columns("NOTRANS"))) bin.DataSource = datset bin.DataMember = "induknya" bin2.DataSource = bin bin2.DataMember = "cobaji" DataGridView136109044.DataSource = bin DataGridView236109044.DataSource = bin2 End Sub End Class
Public Class Latihan2236109044
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim firah As New DataTable Dim magfirah As New DataTable Dim datset As New DataSet Dim bin As New BindingSource Dim bin2 As New BindingSource Private Sub latihan2236109044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter Dim cobaji2 As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select * from BARANG ", konek) cobaji.Fill(firah) cobaji2 = New OleDb.OleDbDataAdapter("select detailtransaksi.notrans, detailtransaksi.harga, detailtransaksi.unit, 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", konek) cobaji2.Fill(magfirah) firah.TableName = "induknya" magfirah.TableName = "anaknya" datset.Tables.Add(firah) datset.Tables.Add(magfirah) datset.Relations.Add(New DataRelation("cobaji", datset.Tables("induknya").Columns("KODEBARANG"), datset.Tables("anaknya").Columns("KODEBARANG"))) bin.DataSource = datset bin.DataMember = "induknya" bin2.DataSource = bin bin2.DataMember = "cobaji" DataGridView136109044.DataSource = bin DataGridView236109044.DataSource = bin2 End Sub End Class
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim firah As New DataTable Dim baris As DataRow Private Sub latihan23A36109044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select * from MASTERTRANSAKSI", konek) cobaji.Fill(firah) DataGridView136109044.DataSource = firah End Sub Private Sub BUTTON1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KLIK36109044.Click If Latihan23B36109044.Visible = False Then Latihan23B36109044.Show() Else Latihan23B36109044.Activate() End If baris = firah.DefaultView(BindingContext(firah).Position).Row Latihan23B36109044.TextBox136109044.Text = baris("notrans") Latihan23B36109044.TextBox236109044.Text = baris("jenistransaksi") Latihan23B36109044.DateTimePicker1.Value = baris("tanggaltransaksi") Latihan23B36109044.AmbilData() End Sub
Private Sub KLIK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KLIK36109044.Click
End Sub End Class
Public Class Latihan23B36109044
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tesji As New DataTable Dim cobaji As New OleDb.OleDbDataAdapter Public Sub AmbilData() cobaji = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where NOTRANS ='" & TextBox136109044.Text & "'", konek) cobaji.Fill(tesji) End Sub Private Sub Latihan23B3619044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DataGridView1.DataSource = tesji End Sub End Class
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim firah As New DataTable Dim baris As DataRow
Private Sub Latihan24B36109044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select * from BARANG", konek) cobaji.Fill(firah) DataGridView136109044.DataSource = firah End Sub
Private Sub butoon2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butoon236109044.Click If Latihan24B36109044.Visible = False Then Latihan24B36109044.Show() Else Latihan24B36109044.Activate() End If baris = firah.DefaultView(BindingContext(firah).Position).Row Latihan24B36109044.TextBox136109044.Text = baris("KODEBARANG") Latihan24B36109044.TextBox236109044.Text = baris("NAMABARANG") Latihan24B36109044.TextBox336109044.Text = baris("HARGAJUAL") Latihan24B36109044.TextBox436109044.Text = baris("PERSEDIAANAWAL") Latihan24B36109044.AmbilData() End Sub End Class
Public Class Latihan24B36109044
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tesji As New DataTable Dim cobaji As New OleDb.OleDbDataAdapter Public Sub AmbilData() cobaji = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109044.Text & "'", konek) cobaji.Fill(tesji) End Sub
Private Sub latihan24B36109044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DataGridView136109044.DataSource = tesji End Sub End Class
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim firah As New DataTable Dim baris As DataRow Dim cobaji As New OleDb.OleDbDataAdapter Private Sub Latihan25A36109044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load cobaji = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang ", konek) cobaji.Fill(firah) DataGridView136109044.DataSource = firah End Sub Private Sub butoon2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109044.Click If Latihan25B36109044.Visible = False Then Latihan25B36109044.Show() Else Latihan25B36109044.Activate() End If baris = firah.DefaultView(BindingContext(firah).Position).Row Latihan25B36109044.TextBox136109044.Text = baris("KODEBARANG") Latihan25B36109044.TextBox236109044.Text = baris("NAMABARANG") Latihan25B36109044.TextBox336109044.Text = baris("HARGAJUAL") Latihan25B36109044.TextBox436109044.Text = baris("PERSEDIAANAWAL") Latihan25B36109044.AmbilData() End Sub End Class
Public Class Latihan25B36109044
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tesji As New DataTable Dim cobaji As New OleDb.OleDbDataAdapter Public Sub AmbilData() cobaji = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109044.Text & "'", konek) cobaji.Fill(tesji) End Sub
Private Sub Latihan25B36109044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DataGridView136109044.DataSource = tesji End Sub End Class
Latihan_18_36109056 Public Class latihan_18_36109056 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim biya As New DataTable Private Sub latihan_18_36109056_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang", CONECT) adapter.Fill(biya) DataGridView1.DataSource = biya End Sub End Class
Latihan_19_36109056 Public Class latihan_19_36109056 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim biya As New DataTable Private Sub latihan_19_36109056_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = 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", CONECT) adapter.Fill(biya) DataGridView36109056.DataSource = biya End Sub End Class
Latihan_20_36109056 Public Class latihan_20_36109056 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim biya As New DataTable Private Sub latihan_20_36109056_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = 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", CONECT) adapter.Fill(biya) DataGridView36109056.DataSource = biya End Sub End Class
Latihan_21_36109056 Public Class latihan_21_36109056 Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim biya As New DataTable Dim biyaanak As New DataTable Dim datset As New DataSet Dim bin As New BindingSource Dim bin2 As New BindingSource Private Sub latihan_2136109056_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter Dim cobaji2 As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", konek) cobaji.Fill(biya) cobaji2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", konek) cobaji2.Fill(biyaanak) biya.TableName = "induknya" biyaanak.TableName = "anaknya" datset.Tables.Add(biya) datset.Tables.Add(biyaanak) datset.Relations.Add(New DataRelation("cobaji", datset.Tables("induknya").Columns("NOTRANS"), datset.Tables("anaknya").Columns("NOTRANS"))) bin.DataSource = datset bin.DataMember = "induknya" bin2.DataSource = bin bin2.DataMember = "cobaji" dgv1_36109056.DataSource = bin dgv2_36109056.DataSource = bin2 End Sub End Class
Latihan_22_36109056 Public Class latihan_22_36109056 Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim biya As New DataTable Dim biyaanak As New DataTable Dim datset As New DataSet Dim bin As New BindingSource Dim bin2 As New BindingSource Private Sub latihan_22_36109056_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim coba As New OleDb.OleDbDataAdapter Dim coba2 As New OleDb.OleDbDataAdapter coba = New OleDb.OleDbDataAdapter("select * from BARANG ", konek) coba.Fill(biya) coba2 = New OleDb.OleDbDataAdapter("select detailtransaksi.notrans, detailtransaksi.harga, detailtransaksi.unit, 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", konek) coba2.Fill(biyaanak) biya.TableName = "induknya" biyaanak.TableName = "anaknya" datset.Tables.Add(biya) datset.Tables.Add(biyaanak) datset.Relations.Add(New DataRelation("coba", datset.Tables("induknya").Columns("KODEBARANG"), datset.Tables("anaknya").Columns("KODEBARANG"))) bin.DataSource = datset bin.DataMember = "induknya" bin2.DataSource = bin bin2.DataMember = "coba" dgv1_36109056.DataSource = bin dgv2_36109056.DataSource = bin2 End Sub End Class
Latihan_23a_36109056 Public Class latihan_23a_36109056 Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim biya As New DataTable Dim baris As DataRow Private Sub latihan_23a_026_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select * from MASTERTRANSAKSI", konek) cobaji.Fill(biya) dgv36109056.DataSource = biya End Sub
Private Sub Button36109056_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button36109056.Click If latihan_23b_36109056.Visible = False Then latihan_23b_36109056.Show() Else latihan_23b_36109056.Activate() End If baris = biya.DefaultView(BindingContext(biya).Position).Row latihan_23b_36109056.TextBox136109056.Text = baris("notrans") latihan_23b_36109056.TextBox236109056.Text = baris("jenistransaksi") latihan_23b_36109056.dtp36109056.Value = baris("tanggaltransaksi") latihan_23b_36109056.AmbilData()
End Sub End Class
Latihan_23b_36109056 Public Class latihan_23b_36109056 Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tesji As New DataTable Dim cobaji As New OleDb.OleDbDataAdapter Public Sub AmbilData() cobaji = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where NOTRANS ='" & TextBox136109056.Text & "'", konek) cobaji.Fill(tesji) End Sub Private Sub latihan_23b_36109056_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() dgv36109056.DataSource = tesji End Sub End Class
Latihan_24a_36109056 Public Class latihan_24a_36109056 Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim biya As New DataTable Dim baris As DataRow Private Sub latihan_24a_026_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select * from BARANG", konek) cobaji.Fill(biya) dgv36109056.DataSource = biya End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109056.Click If latihan_24b_36109056.Visible = False Then latihan_24b_36109056.Show() Else latihan_24b_36109056.Activate() End If baris = biya.DefaultView(BindingContext(biya).Position).Row latihan_24b_36109056.TextBox1_36109056.Text = baris("KODEBARANG") latihan_24b_36109056.TextBox2_36109056.Text = baris("NAMABARANG") latihan_24b_36109056.TextBox3_36109056.Text = baris("HARGAJUAL") latihan_24b_36109056.TextBox4_36109056.Text = baris("PERSEDIAANAWAL") latihan_24b_36109056.AmbilData() End Sub End Class
Latihan_24b_36109056 Public Class latihan_24b_36109056 Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tesji As New DataTable Dim cobaji As New OleDb.OleDbDataAdapter Public Sub AmbilData() cobaji = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox1_36109056.Text & "'", konek) cobaji.Fill(tesji) End Sub Private Sub latihan_24b_36109056_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() dgv1_36109056.DataSource = tesji End Sub End Class
Latihan_25a_36109056 Public Class latihan_25a_36109056 Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim biya As New DataTable Dim baris As DataRow Dim coba As New OleDb.OleDbDataAdapter Private Sub latihan_25a_36109056_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load coba = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang ", konek) coba.Fill(biya) dgv36109056.DataSource = biya End Sub
Private Sub Button1_36109056_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1_36109056.Click If latihan_25b_36109056.Visible = False Then latihan_25b_36109056.Show() Else latihan_25b_36109056.Activate() End If baris = biya.DefaultView(BindingContext(biya).Position).Row latihan_25b_36109056.TextBox1_36109056.Text = baris("KODEBARANG") latihan_25b_36109056.TextBox2_36109056.Text = baris("NAMABARANG") latihan_25b_36109056.TextBox3_36109056.Text = baris("HARGAJUAL") latihan_25b_36109056.TextBox4_36109056.Text = baris("PERSEDIAANAWAL") latihan_25b_36109056.AmbilData() End Sub End Class
Latihan_25b_36109056 Public Class latihan_25b_36109056 Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tes As New DataTable Dim coba As New OleDb.OleDbDataAdapter Public Sub AmbilData() coba = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA,(DETAILTRANSAKSI.UNIT * DETAILTRANSAKSI.HARGA)as Jumlah from DETAILTRANSAKSI where KODEBARANG ='" & TextBox1_36109056.Text & "'", konek) coba.Fill(tes) End Sub Private Sub latihan_25b_36109056_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() dgv1_36109056.DataSource = tes End Sub End Class
Latihan_26a_36109056 Public Class latihan_26a_36109056 Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim biya As New DataTable Dim baris As DataRow Dim coba As New OleDb.OleDbDataAdapter Private Sub latihan_26a_36109056_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load coba = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang", konek) coba.Fill(biya) dgv1_36109056.DataSource = biya End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1_36109056.Click If latihan_26b_36109056.Visible = False Then latihan_26b_36109056.Show() Else latihan_26b_36109056.Activate() End If baris = biya.DefaultView(BindingContext(biya).Position).Row latihan_26b_36109056.TextBox1_36109056.Text = baris("KODEBARANG") latihan_26b_36109056.TextBox2_36109056.Text = baris("NAMABARANG") latihan_26b_36109056.TextBox3_36109056.Text = baris("HARGAJUAL") latihan_26b_36109056.TextBox4_36109056.Text = baris("PERSEDIAANAWAL") latihan_26b_36109056.AmbilData() End Sub End Class
Latihan_26b_36109056 Public Class latihan_26b_36109056 Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tes As New DataTable Dim coba As New OleDb.OleDbDataAdapter Public Sub AmbilData() coba = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox1_36109056.Text & "'", konek) coba.Fill(tes) Dim tu, total As Integer For Each x As DataRow In tes.Rows tu = tu + x("UNIT") total = total + x("HARGA") Next TextBox5_36109056.Text = tu TextBox6_36109056.Text = total End Sub Private Sub latihan_26b_36109056_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() dgv1_36109056.DataSource = tes End Sub End Class
Public Class Latihan1536109034 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim NUNU As New DataTable Dim adapter As OleDb.OleDbDataAdapter
Private Sub Latihan1536109034_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load adapter = New OleDb.OleDbDataAdapter("select * FROM BARANG", CONECT) adapter.Fill(NUNU) DataGridView1.DataSource = NUNU End Sub End Class
Public Class Latihan1636109034 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim NUNU As New DataTable Dim adapter As OleDb.OleDbDataAdapter
Private Sub Latihan1636109034_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load adapter = New OleDb.OleDbDataAdapter("select * FROM MASTERTRANSAKSI", CONECT) adapter.Fill(NUNU) DataGridView1.DataSource = NUNU End Sub End Class
Public Class Latihan1736109034 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim NUNU As New DataTable Dim adapter As OleDb.OleDbDataAdapter
Private Sub Latihan1736109034_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load adapter = New OleDb.OleDbDataAdapter("select * FROM DETAILTRANSAKSI", CONECT) adapter.Fill(NUNU) DataGridView1.DataSource = NUNU End Sub End Class
Public Class Latihan1836109034 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim NUNU As New DataTable Dim adapter As OleDb.OleDbDataAdapter Private Sub Latihan1836109034_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load adapter = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang", CONECT) adapter.Fill(NUNU) DataGridView1.DataSource = NUNU End Sub End Class
Public Class Latihan1936109034 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim NUNU As New DataTable Dim adapter As OleDb.OleDbDataAdapter Private Sub Latihan1936109034_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load adapter = 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", CONECT) adapter.Fill(NUNU) DataGridView1.DataSource = NUNU End Sub End Class
Public Class Latihan2036109034 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim NUNU As New DataTable Dim adapter As OleDb.OleDbDataAdapter Private Sub Latihan2036109034_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load adapter = 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", CONECT) adapter.Fill(NUNU) DataGridView1.DataSource = NUNU End Sub End Class
Public Class Latihan2136109034 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim NUR As New DataTable Dim HIDAYAH As New DataTable Dim DATASET As New DataSet Dim BS1 As New BindingSource Dim BS2 As New BindingSource Private Sub Latihan2136109034_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim TRY1 As New OleDb.OleDbDataAdapter Dim TRY2 As New OleDb.OleDbDataAdapter TRY1 = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", CONECT) TRY1.Fill(NUR) TRY2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", CONECT) TRY2.Fill(HIDAYAH) NUR.TableName = "induknya" HIDAYAH.TableName = "anaknya" DATASET.Tables.Add(NUR) DATASET.Tables.Add(HIDAYAH) DATASET.Relations.Add(New DataRelation("TRY1", DATASET.Tables("induknya").Columns("NOTRANS"), DATASET.Tables("anaknya").Columns("NOTRANS"))) BS1.DataSource = DATASET BS1.DataMember = "induknya" BS2.DataSource = BS1 BS2.DataMember = "TRY1" DGV136109034.DataSource = BS1 DGV236109034.DataSource = BS2 End Sub End Class
Public Class Latihan2236109034 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim NUR As New DataTable Dim HIDAYAH As New DataTable Dim DATASET As New DataSet Dim BS1 As New BindingSource Dim BS2 As New BindingSource Private Sub Latihan2236109034_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim TRY1 As New OleDb.OleDbDataAdapter Dim TRY2 As New OleDb.OleDbDataAdapter TRY1 = New OleDb.OleDbDataAdapter("select * from BARANG ", CONECT) TRY1.Fill(NUR) TRY2 = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.HARGA, DETAILTRANSAKSI.UNIT, 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", CONECT) TRY2.Fill(HIDAYAH) NUR.TableName = "induknya" HIDAYAH.TableName = "anaknya" DATASET.Tables.Add(NUR) DATASET.Tables.Add(HIDAYAH) DATASET.Relations.Add(New DataRelation("TRY1", DATASET.Tables("induknya").Columns("KODEBARANG"), DATASET.Tables("anaknya").Columns("KODEBARANG"))) BS1.DataSource = DATASET BS1.DataMember = "induknya" BS2.DataSource = BS1 BS2.DataMember = "TRY1" DGV136109034.DataSource = BS1 DGV236109034.DataSource = BS2 End Sub End Class
Public Class Latihan23A36109034 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim NURHIDAYAH As New DataTable Dim BARIS As DataRow Private Sub Latihan23A36109034_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim BEDE As New OleDb.OleDbDataAdapter BEDE = New OleDb.OleDbDataAdapter("select * from MASTERTRANSAKSI", CONECT) BEDE.Fill(NURHIDAYAH) DGV136109034.DataSource = NURHIDAYAH End Sub Private Sub KLIKK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KLIKK.Click If Latihan23B36109034.Visible = False Then Latihan23B36109034.Show() Else Latihan23B36109034.Activate() End If BARIS = NURHIDAYAH.DefaultView(BindingContext(NURHIDAYAH).Position).Row Latihan23B36109034.TextBox1_36109034.Text = BARIS("notrans") Latihan23B36109034.TextBox3_36109034.Text = BARIS("jenistransaksi") Latihan23B36109034.DTP1_36109034.Value = BARIS("tanggaltransaksi") Latihan23B36109034.AmbilData() End Sub End Class
Public Class Latihan23B36109034 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim TRY1 As New DataTable Dim TRY2 As New OleDb.OleDbDataAdapter Public Sub AmbilData() TRY2 = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where NOTRANS ='" & TextBox1_36109034.Text & "'", CONECT) TRY2.Fill(TRY1) End Sub Private Sub Latihan23B3619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DGV1_36109034.DataSource = TRY1 End Sub End Class
Public Class Latihan24A36109034 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim NURHIDAYAH As New DataTable Dim BARIS As DataRow Dim BEDE As New OleDb.OleDbDataAdapter Private Sub Latihan24A36109034_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load BEDE = New OleDb.OleDbDataAdapter("select * from BARANG", CONECT) BEDE.Fill(NURHIDAYAH) DGV136109034.DataSource = NURHIDAYAH End Sub Private Sub KLIK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KLIK.Click If Latihan24B36109034.Visible = False Then Latihan24B36109034.Show() Else Latihan24B36109034.Activate() End If BARIS = NURHIDAYAH.DefaultView(BindingContext(NURHIDAYAH).Position).Row Latihan24B36109034.TextBox1_36109034.Text = BARIS("KODEBARANG") Latihan24B36109034.TextBox2_36109034.Text = BARIS("NAMABARANG") Latihan24B36109034.TextBox3_36109034.Text = BARIS("HARGAJUAL") Latihan24B36109034.TextBox4_36109034.Text = BARIS("PERSEDIAANAWAL") Latihan24B36109034.AmbilData() End Sub End Class
Public Class Latihan24B36109034 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim TRY1 As New DataTable Dim TRY2 As New OleDb.OleDbDataAdapter Public Sub AmbilData() TRY2 = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox1_36109034.Text & "'", CONECT) TRY2.Fill(TRY1) End Sub Private Sub latihan24B36109034_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DGV136109034.DataSource = TRY1 End Sub End Class
Public Class Latihan25A36109034 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim NURHIDAYAH As New DataTable Dim BARIS As DataRow Dim BEDE As New OleDb.OleDbDataAdapter Private Sub Latihan25A36109034_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load BEDE = New OleDb.OleDbDataAdapter("select MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA,(DETAILTRANSAKSI.UNIT*DETAILTRANSAKSI.HARGA)AS JUMLAH, BARANG.KODEBARANG, BARANG.NAMABARANG,BARANG.HARGAJUAL,BARANG.PERSEDIAANAWAL FROM (MASTERTRANSAKSI INNER JOIN DETAILTRANSAKSI ON MASTERTRANSAKSI.NOTRANS=DETAILTRANSAKSI.NOTRANS) INNER JOIN BARANG ON DETAILTRANSAKSI.KODEBARANG=BARANG.KODEBARANG ", CONECT) BEDE.Fill(NURHIDAYAH) DGV136109034.DataSource = NURHIDAYAH End Sub Private Sub KLIK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KLIK.Click If Latihan25B36109034.Visible = False Then Latihan25B36109034.Show() Else Latihan25B36109034.Activate() End If BARIS = NURHIDAYAH.DefaultView(BindingContext(NURHIDAYAH).Position).Row Latihan25B36109034.TextBox1_36109034.Text = BARIS("KODEBARANG") Latihan25B36109034.TextBox2_36109034.Text = BARIS("NAMABARANG") Latihan25B36109034.TextBox3_36109034.Text = BARIS("HARGAJUAL") Latihan25B36109034.TextBox4_36109034.Text = BARIS("PERSEDIAANAWAL") Latihan25B36109034.AmbilData() End Sub End Class
Public Class Latihan25B36109034 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim TRY1 As New DataTable Dim TRY2 As New OleDb.OleDbDataAdapter Public Sub AmbilData() TRY2 = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox1_36109034.Text & "'", CONECT) TRY2.Fill(TRY1) End Sub Private Sub Latihan25B36109034_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DGV136109034.DataSource = TRY1 End Sub End Class
Public Class Latihan26A36109034 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim NURHIDAYAH As New DataTable Dim BARIS As DataRow Dim BEDE As New OleDb.OleDbDataAdapter Private Sub Latihan26A36109034_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load BEDE = New OleDb.OleDbDataAdapter("SELECT MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA,(DETAILTRANSAKSI.UNIT*DETAILTRANSAKSI.HARGA)AS JUMLAH, BARANG.KODEBARANG, BARANG.NAMABARANG,BARANG.HARGAJUAL,BARANG.PERSEDIAANAWAL FROM (MASTERTRANSAKSI INNER JOIN DETAILTRANSAKSI ON MASTERTRANSAKSI.NOTRANS=DETAILTRANSAKSI.NOTRANS) INNER JOIN BARANG ON DETAILTRANSAKSI.KODEBARANG=BARANG.KODEBARANG", CONECT) BEDE.Fill(NURHIDAYAH) DGV136109034.DataSource = NURHIDAYAH End Sub Private Sub KLIK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KLIK.Click If Latihan26B36109034.Visible = False Then Latihan26B36109034.Show() Else Latihan26B36109034.Activate() End If BARIS = NURHIDAYAH.DefaultView(BindingContext(NURHIDAYAH).Position).Row Latihan26B36109034.TextBox1_36109034.Text = BARIS("KODEBARANG") Latihan26B36109034.TextBox2_36109034.Text = BARIS("NAMABARANG") Latihan26B36109034.TextBox3_36109034.Text = BARIS("HARGAJUAL") Latihan26B36109034.TextBox4_36109034.Text = BARIS("PERSEDIAANAWAL") Latihan26B36109034.AmbilData() End Sub End Class
Public Class Latihan26B36109034 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim GUE As New DataTable Dim BEDE As New OleDb.OleDbDataAdapter Public Sub AmbilData() BEDE = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA,(DETAILTRANSAKSI.UNIT * DETAILTRANSAKSI.HARGA)as JUMLAH from DETAILTRANSAKSI where KODEBARANG ='" & TextBox1_36109034.Text & "'", CONECT) BEDE.Fill(GUE) Dim tu, total As Integer For Each x As DataRow In GUE.Rows tu = tu + x("UNIT") total = total + x("JUMLAH") Next TextBox5_36109034.Text = tu TextBox6_36109034.Text = total End Sub Private Sub Latihan26B36109034_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DGV136109034.DataSource = GUE
Public Class Form15_36109037 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Juni As New DataTable
Private Sub Form15_36109037_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select * from BARANG", CONECT) adapter.Fill(Juni) DataGridView1.DataSource = Juni End Sub End Class
Public Class Form16_36109037 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Juni As New DataTable Private Sub Form16_36109037_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select * from MASTERTRANSAKSI", CONECT) adapter.Fill(Juni) DataGridView1.DataSource = Juni End Sub End Class
Public Class Form17_36109037 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Juni As New DataTable Private Sub Form17_36109037_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select * from DETAILTRANSAKSI", CONECT) adapter.Fill(Juni) DataGridView1.DataSource = Juni End Sub End Class
Public Class Form18_36109037 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Juni As New DataTable Private Sub Form18_36109037_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang", CONECT) adapter.Fill(Juni) DataGridView1.DataSource = Juni End Sub End Class
Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim armita As New DataTable
Dim mita As New OleDb.OleDbDataAdapter
Private Sub LATIHAN01536109040_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load mita = New OleDb.OleDbDataAdapter("select * from barang", connect) mita.Fill(armita) DataGridView1.DataSource = armita End Sub
End class
Public Class LATIHAN01636109040
Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim armita As New DataTable
Dim mita As New OleDb.OleDbDataAdapter
Private Sub LATIHAN01636109040_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load mita = New OleDb.OleDbDataAdapter("select * from mastertransaksi", connect) mita.Fill(armita) DataGridView1.DataSource = armita End Sub End Class
Public Class LATIHAN01736109040 Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim armita As New DataTable
Dim mita As New OleDb.OleDbDataAdapter
Private Sub LATIHAN01736109040_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load mita = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", connect) mita.Fill(armita) DataGridView1.DataSource = armita End Sub
End Class
Public Class LATIHAN01836109040 Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim armita As New DataTable
Dim mita As New OleDb.OleDbDataAdapter
Private Sub LATIHAN01836109040_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load mita = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang", connect) mita.Fill(armita) DataGridView1.DataSource = armita End Sub End Class
Public Class LATIHAN01936109040 Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim armita As New DataTable
Dim mita As New OleDb.OleDbDataAdapter
Private Sub LATIHAN01936109040_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load mita = 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 ", connect) mita.Fill(armita) DataGridView1.DataSource = armita
End Sub
End Class
Public Class LATIHAN02036109040 Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim armita As New DataTable
Dim mita As New OleDb.OleDbDataAdapter
Private Sub LATIHAN02036109040_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load mita = 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 ", connect) mita.Fill(armita) DataGridView1.DataSource = armita
End Sub End Class
Public Class LATIHAN02136109040 Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim armita As New DataTable Dim mitaanak As New DataTable Dim datset As New DataSet Dim mita1 As New BindingSource Dim mita2 As New BindingSource Private Sub LATIHAN02136109040_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim uji1 As New OleDb.OleDbDataAdapter Dim uji2 As New OleDb.OleDbDataAdapter uji1 = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", connect) uji1.Fill(armita) uji2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", connect) uji2.Fill(mitaanak) armita.TableName = "induknya" mitaanak.TableName = "anaknya" datset.Tables.Add(armita) datset.Tables.Add(mitaanak) datset.Relations.Add(New DataRelation("cobaji", datset.Tables("induknya").Columns("NOTRANS"), datset.Tables("anaknya").Columns("NOTRANS"))) mita1.DataSource = datset mita1.DataMember = "induknya" mita2.DataSource = mita1 mita2.DataMember = "cobaji" DataGridView1.DataSource = mita1 DataGridView2.DataSource = mita2
Public Class LATIHAN02236109040 Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim armita As New DataTable Dim mitaanak As New DataTable Dim datset As New DataSet Dim mita1 As New BindingSource Dim mita2 As New BindingSource
Private Sub LATIHAN02236109040_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim uji1 As New OleDb.OleDbDataAdapter Dim uji2 As New OleDb.OleDbDataAdapter uji1 = New OleDb.OleDbDataAdapter("select * from BARANG ", connect) uji1.Fill(armita) uji2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", connect) uji2.Fill(mitaanak) armita.TableName = "induknya" mitaanak.TableName = "anaknya" datset.Tables.Add(armita) datset.Tables.Add(mitaanak) datset.Relations.Add(New DataRelation("cobaji", datset.Tables("induknya").Columns("KODEBARANG"), datset.Tables("anaknya").Columns("KODEBARANG"))) mita1.DataSource = datset mita1.DataMember = "induknya" mita2.DataSource = mita1 mita2.DataMember = "cobaji" DataGridView1.DataSource = mita1
Private Sub LATIHAN023A36109040_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select * from MASTERTRANSAKSI", connect) cobaji.Fill(armita) DataGridView1.DataSource = armita End Sub
Private Sub KLIKK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KLIKK.Click If LATIHAN023B36109040.Visible = False Then LATIHAN023B36109040.Show() Else LATIHAN023B36109040.Activate() End If baris = armita.DefaultView(BindingContext(armita).Position).Row LATIHAN023B36109040.TextBox1040.Text = baris("notrans") LATIHAN023B36109040.TextBox3040.Text = baris("jenistransaksi") LATIHAN023B36109040.DateTimePicker1040.Value = baris("tanggaltransaksi") LATIHAN023B36109040.AmbilData() End Sub End Class Public Class LATIHAN023B36109040 Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tesji As New DataTable Dim cobaji As New OleDb.OleDbDataAdapter
Public Sub AmbilData() cobaji = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where NOTRANS ='" & TextBox1040.Text & "'", connect) cobaji.Fill(tesji) End Sub
Private Sub LATIHAN023B36109040_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DataGridView1.DataSource = tesji End Sub End Class
Public Class Latihan024A36109040 Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim armita As New DataTable Dim baris As DataRow
Private Sub Latihan024A36109040_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim uji1 As New OleDb.OleDbDataAdapter uji1 = New OleDb.OleDbDataAdapter("select * from BARANG", connect) uji1.Fill(armita) DataGridView1.DataSource = armita End Sub
Private Sub butoon2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butoon2.Click If LATIHAN024B36109040.Visible = False Then LATIHAN024B36109040.Show() Else LATIHAN024B36109040.Activate() End If baris = armita.DefaultView(BindingContext(armita).Position).Row LATIHAN024B36109040.TextBox1040.Text = baris("KODEBARANG") LATIHAN024B36109040.TextBox2040.Text = baris("NAMABARANG") LATIHAN024B36109040.TextBox3040.Text = baris("HARGAJUAL") LATIHAN024B36109040.TextBox4040.Text = baris("PERSEDIAANAWAL") LATIHAN024B36109040.AmbilData() End Sub
End Class Public Class LATIHAN024B36109040 Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tesji As New DataTable Dim uji1 As New OleDb.OleDbDataAdapter Public Sub AmbilData() uji1 = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox1040.Text & "'", connect) uji1.Fill(tesji) End Sub
Private Sub LATIHAN024B36109040_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DataGridView1.DataSource = tesji
Public Class LATIHAN025A36109040 Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim armita As New DataTable Dim baris As DataRow Dim uji1 As New OleDb.OleDbDataAdapter
Private Sub LATIHAN025A36109040_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load uji1 = New OleDb.OleDbDataAdapter("select * from BARANG", connect) uji1.Fill(armita) DataGridView1.DataSource = armita End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If LATIHAN025B36109040.Visible = False Then LATIHAN025B36109040.Show() Else LATIHAN025B36109040.Activate() End If baris = armita.DefaultView(BindingContext(armita).Position).Row LATIHAN025B36109040.TextBox1.Text = baris("KODEBARANG") LATIHAN025B36109040.TextBox2.Text = baris("NAMABARANG") LATIHAN025B36109040.TextBox3.Text = baris("HARGAJUAL") LATIHAN025B36109040.TextBox4.Text = baris("PERSEDIAANAWAL") LATIHAN025B36109040.AmbilData() End Sub End Class Public Class LATIHAN025B36109040 Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tesji As New DataTable Dim uji1 As New OleDb.OleDbDataAdapter Public Sub AmbilData() uji1 = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox1.Text & "'", connect) uji1.Fill(tesji) End Sub
Private Sub LATIHAN025B36109040_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DataGridView1.DataSource = tesji End Sub
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim NOVI As New DataTable Private Sub latihan153619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select * from barang", konek) cobaji.Fill(NOVI) DGV136109051.DataSource = NOVI End Sub End Class
Public Class LATIHAN01636109051
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim novi As New DataTable Private Sub latihan1636109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", conect) cobaji.Fill(novi) DGV136109051.DataSource = novi End Sub End Class
Public Class LATIHAN01736109051
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim novi As New DataTable
Private Sub latihan1736109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", conect) cobaji.Fill(novi) DGV136109051.DataSource = novi End Sub End Class
Public Class LATIHAN01836109051
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim novi As New DataTable
Private Sub latihan183619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang ", conect) cobaji.Fill(novi) DGV136109051.DataSource = novi End Sub End Class
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim NOVI As New DataTable Dim NOVIANI As New DataTable Dim datset As New DataSet Dim bin As New BindingSource Dim bin2 As New BindingSource Private Sub latihan2236109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter Dim cobaji2 As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select * from BARANG ", CONECT) cobaji.Fill(NOVI) cobaji2 = New OleDb.OleDbDataAdapter("select detailtransaksi.notrans, detailtransaksi.harga, detailtransaksi.unit, 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", CONECT) cobaji2.Fill(NOVIANI) NOVI.TableName = "induknya" NOVIANI.TableName = "anaknya" datset.Tables.Add(NOVI) datset.Tables.Add(NOVIANI) datset.Relations.Add(New DataRelation("cobaji", datset.Tables("induknya").Columns("KODEBARANG"), datset.Tables("anaknya").Columns("KODEBARANG"))) bin.DataSource = datset bin.DataMember = "induknya" bin2.DataSource = bin bin2.DataMember = "cobaji" DGV136109051.DataSource = bin DGV236109051.DataSource = bin2 End Sub End Class
Dim KONEK As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim ruang As New DataTable Dim kosong As New OleDb.OleDbDataAdapter Public Sub AmbilData() kosong = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where NOTRANS ='" & TextBox136109049.Text & "'", KONEK) kosong.Fill(ruang) End Sub Private Sub latihan023B_36109049_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DGV1_36109049.DataSource = ruang End Sub End Class
Public Class LATIHAN024A36109049
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim wirda As New DataTable Dim baris As DataRow
Private Sub latihan024A3619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select * from BARANG", konek) cobaji.Fill(wirda) DGV136109049.DataSource = wirda End Sub
Private Sub butoon2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button236109049.Click If LATIHAN024B36109049.Visible = False Then LATIHAN024B36109049.Show() Else LATIHAN024B36109049.Activate() End If baris = wirda.DefaultView(BindingContext(wirda).Position).Row LATIHAN024B36109049.TextBox136109049.Text = baris("KODEBARANG") LATIHAN024B36109049.TextBox236109049.Text = baris("NAMABARANG") LATIHAN024B36109049.TextBox336109049.Text = baris("HARGAJUAL") LATIHAN024B36109049.TextBox436109049.Text = baris("PERSEDIAANAWAL") LATIHAN024B36109049.AmbilData() End Sub End Class
Public Class LATIHAN024B36109049 Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim imajinasi As New DataTable Dim conan As New OleDb.OleDbDataAdapter Public Sub AmbilData() conan = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109049.Text & "'", konek) conan.Fill(imajinasi) End Sub
Private Sub latihan024B3619049_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DGV136109049.DataSource = imajinasi End Sub End Class
Public Class LATIHAN025A36109049
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim WIRDA As New DataTable Dim baris As DataRow Dim cobaji As New OleDb.OleDbDataAdapter Private Sub latihan025B36109049_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load cobaji = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang ", CONECT) cobaji.Fill(WIRDA) DGV136109049.DataSource = WIRDA End Sub Private Sub butoon2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109049.Click If LATIHAN025B36109049.Visible = False Then LATIHAN025B36109049.Show() Else LATIHAN025B36109049.Activate() End If baris = WIRDA.DefaultView(BindingContext(WIRDA).Position).Row LATIHAN025B36109049.TextBox136109049.Text = baris("KODEBARANG") LATIHAN025B36109049.TextBox236109049.Text = baris("NAMABARANG") LATIHAN025B36109049.TextBox336109049.Text = baris("HARGAJUAL") LATIHAN025B36109049.TextBox436109049.Text = baris("PERSEDIAANAWAL") LATIHAN025B36109049.AmbilData() End Sub End Class
maaf pak..saya sudah kasih masuk semua latihan berkali-kali..tapi tidak tahu kenapa sebagian tidak muncul di komentar.. jadi saya kasi masuk di http://www.novianimalnan.blogspot.com/
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim novi As New DataTable Private Sub latihan1936109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.kodebarang, detailtransaksi.unit, detailtransaksi.harga from mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans ", conect) cobaji.Fill(novi) DGV136109051.DataSource = novi End Sub End Class
Public Class LATIHAN02036109051
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim novi As New DataTable Private Sub latihan2036109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select 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 ", conect) cobaji.Fill(novi) DGV136109051.DataSource = novi End Sub End Class
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim NOVI As New DataTable Dim baris As DataRow Dim greenholic As New OleDb.OleDbDataAdapter Private Sub latihan25A36109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load greenholic = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang ", CONECT) greenholic.Fill(NOVI) DGV136109051.DataSource = NOVI End Sub Private Sub butoon2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If latihan25B36109051.Visible = False Then latihan25B36109051.Show() Else latihan25B36109051.Activate() End If baris = NOVI.DefaultView(BindingContext(NOVI).Position).Row latihan25B36109051.TextBox136109051.Text = baris("KODEBARANG") latihan25B36109051.TextBox236109051.Text = baris("NAMABARANG") latihan25B36109051.TextBox336109051.Text = baris("HARGAJUAL") latihan25B36109051.TextBox436109051.Text = baris("PERSEDIAANAWAL") latihan25B36109051.AmbilData() End Sub End Class
Public Class latihan25B36109051
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim molnan As New DataTable Dim gelang As New OleDb.OleDbDataAdapter Public Sub AmbilData() gelang = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA,(DETAILTRANSAKSI.UNIT * DETAILTRANSAKSI.HARGA)as Jumlah from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109051.Text & "'", conect) gelang.Fill(molnan) End Sub
Private Sub latihan25B36109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DGV136109051.DataSource = molnan End Sub End Class
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim novi As New DataTable Dim baris As DataRow Dim adriana As New OleDb.OleDbDataAdapter Private Sub latihan026A36109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load adriana = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang", conect) adriana.Fill(novi) DGV136109051.DataSource = novi End Sub Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If LATIHAN026B36109051.Visible = False Then LATIHAN026B36109051.Show() Else LATIHAN026B36109051.Activate() End If baris = novi.DefaultView(BindingContext(novi).Position).Row LATIHAN026B36109051.TextBox136109051.Text = baris("KODEBARANG") LATIHAN026B36109051.TextBox236109051.Text = baris("NAMABARANG") LATIHAN026B36109051.TextBox336109051.Text = baris("HARGAJUAL") LATIHAN026B36109051.TextBox436109051.Text = baris("PERSEDIAANAWAL") LATIHAN026B36109051.AmbilData() End Sub End Class
Public Class LATIHAN026B36109051
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim milanesta As New DataTable Dim ekanaya As New OleDb.OleDbDataAdapter Public Sub AmbilData() ekanaya = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA,(DETAILTRANSAKSI.UNIT * DETAILTRANSAKSI.HARGA)as Jumlah from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109051.Text & "'", conect) ekanaya.Fill(milanesta) Dim tu, total As Integer For Each x As DataRow In milanesta.Rows tu = tu + x("UNIT") total = total + x("jumlah") Next TextBox536109051.Text = tu TextBox636109051.Text = total End Sub Private Sub latihan26B36109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DGV136109051.DataSource = milanesta End Sub End Class
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim novi As New DataTable Dim baris As DataRow Private Sub latihan23A3619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select * from MASTERTRANSAKSI", conect) cobaji.Fill(novi) DGV136109051.DataSource = novi End Sub Private Sub BUTTON1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KLIK.Click If LATIHAN023B36109051.Visible = False Then LATIHAN023B36109051.Show() Else LATIHAN023B36109051.Activate() End If baris = novi.DefaultView(BindingContext(novi).Position).Row LATIHAN023B36109051.TextBox136109051.Text = baris("notrans") LATIHAN023B36109051.TextBox236109051.Text = baris("jenistransaksi") LATIHAN023B36109051.DTP136109051.Value = baris("tanggaltransaksi") LATIHAN023B36109051.AmbilData() End Sub End Class
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim novi As New DataTable Dim baris As DataRow
Private Sub latihan24B36109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select * from BARANG", CONECT) cobaji.Fill(novi) DGV136109051.DataSource = novi End Sub
Private Sub butoon2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butoon2.Click If LATIHAN024B36109051.Visible = False Then LATIHAN024B36109051.Show() Else LATIHAN024B36109051.Activate() End If baris = novi.DefaultView(BindingContext(novi).Position).Row LATIHAN024B36109051.TextBox136109051.Text = baris("KODEBARANG") LATIHAN024B36109051.TextBox236109051.Text = baris("NAMABARANG") LATIHAN024B36109051.TextBox336109051.Text = baris("HARGAJUAL") LATIHAN024B36109051.TextBox436109051.Text = baris("PERSEDIAANAWAL") LATIHAN024B36109051.AmbilData() End Sub End Class
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tesji As New DataTable Dim cobaji As New OleDb.OleDbDataAdapter Public Sub AmbilData() cobaji = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109051.Text & "'", conect) cobaji.Fill(tesji) End Sub
Private Sub latihan024B36109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DGV136109051.DataSource = tesji End Sub End Class
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tesji As New DataTable Dim cobaji As New OleDb.OleDbDataAdapter Public Sub AmbilData() cobaji = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where NOTRANS ='" & TextBox136109051.Text & "'", CONECT) cobaji.Fill(tesji) End Sub Private Sub LATIHAN023B36109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DGV136109051.DataSource = tesji End Sub End Class
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim novi As New DataTable Dim noviani As New DataTable Dim datset As New DataSet Dim bin As New BindingSource Dim bin2 As New BindingSource Private Sub latihan2136109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter Dim cobaji2 As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", conect) cobaji.Fill(novi) cobaji2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", conect) cobaji2.Fill(noviani) novi.TableName = "induknya" noviani.TableName = "anaknya" datset.Tables.Add(novi) datset.Tables.Add(noviani) datset.Relations.Add(New DataRelation("cobaji", datset.Tables("induknya").Columns("NOTRANS"), datset.Tables("anaknya").Columns("NOTRANS"))) bin.DataSource = datset bin.DataMember = "induknya" bin2.DataSource = bin bin2.DataMember = "cobaji" DGV136109051.DataSource = bin DGV236109051.DataSource = bin2 End Sub End Class
Public Class Form1936109050 Dim conect As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim uni As New DataTable Private Sub Form1936109050_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = 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", conect) adapter.Fill(uni) DataGridView1.DataSource = uni End Sub End Class
Public Class Form2036109050 Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim uni As New DataTable Private Sub Form2036109050_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim nideria As New OleDb.OleDbDataAdapter nideria = 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 ", konek) nideria.Fill(uni) DataGridView1.DataSource = uni End Sub End Class
Public Class Form2136109050 Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim uni As New DataTable Dim uni2 As New DataTable Dim datset As New DataSet Dim bin As New BindingSource Dim bin2 As New BindingSource Private Sub form2136109050_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim nideria As New OleDb.OleDbDataAdapter Dim nideria2 As New OleDb.OleDbDataAdapter nideria = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", konek) nideria.Fill(uni) nideria2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", konek) nideria2.Fill(uni2) uni.TableName = "induknya" uni2.TableName = "anaknya" datset.Tables.Add(uni) datset.Tables.Add(uni2) datset.Relations.Add(New DataRelation("nideria", datset.Tables("induknya").Columns("NOTRANS"), datset.Tables("anaknya").Columns("NOTRANS"))) bin.DataSource = datset bin.DataMember = "induknya" bin2.DataSource = bin bin2.DataMember = "nideria" DataGridView1.DataSource = bin DataGridView2.DataSource = bin2 End Sub End Class
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim WIRDA As New DataTable Dim baris As DataRow Dim terang As New OleDb.OleDbDataAdapter Private Sub latihan26A36109049_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load terang = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang", CONECT) terang.Fill(WIRDA) DGV136109049.DataSource = WIRDA End Sub Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109049.Click If LATIHAN026B36109049.Visible = False Then LATIHAN026B36109049.Show() Else LATIHAN026B36109049.Activate() End If baris = WIRDA.DefaultView(BindingContext(WIRDA).Position).Row LATIHAN026B36109049.TextBox136109049.Text = baris("KODEBARANG") LATIHAN026B36109049.TextBox236109049.Text = baris("NAMABARANG") LATIHAN026B36109049.TextBox336109049.Text = baris("HARGAJUAL") LATIHAN026B36109049.TextBox436109049.Text = baris("PERSEDIAANAWAL") LATIHAN026B36109049.AmbilData() End Sub
End Class
Public Class LATIHAN026B36109049
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim KAMPUS As New DataTable Dim KULIAH As New OleDb.OleDbDataAdapter Public Sub AmbilData() KULIAH = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA,(DETAILTRANSAKSI.UNIT * DETAILTRANSAKSI.HARGA)as Jumlah from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109049.Text & "'", CONECT) KULIAH.Fill(KAMPUS) Dim tu, total As Integer For Each x As DataRow In KAMPUS.Rows tu = tu + x("UNIT") total = total + x("jumlah") Next TextBox536109049.Text = tu TextBox636109049.Text = total End Sub Private Sub latihan026B36109049_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DGV136109049.DataSource = KAMPUS End Sub End Class
Public Class Form24A36109050 Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim uni As New DataTable Dim baris As DataRow
Private Sub Form24A36109050_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select * from BARANG", konek) cobaji.Fill(uni) DataGridView1.DataSource = uni End Sub Private Sub butoon2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butoon2.Click If Form24B36109050.Visible = False Then Form24B36109050.Show() Else Form24B36109050.Activate() End If baris = uni.DefaultView(BindingContext(uni).Position).Row Form24B36109050.TextBox1.Text = baris("KODEBARANG") Form24B36109050.TextBox2.Text = baris("NAMABARANG") Form24B36109050.TextBox3.Text = baris("HARGAJUAL") Form24B36109050.TextBox4.Text = baris("PERSEDIAANAWAL") Form24B36109050.AmbilData() End Sub End Class
Public Class Form24B36109050 Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tesji As New DataTable Dim cobaji As New OleDb.OleDbDataAdapter Public Sub AmbilData() cobaji = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox1.Text & "'", konek) cobaji.Fill(tesji) End Sub Private Sub Form24B36109050_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DataGridView1.DataSource = tesji End Sub End Class
Public Class Form25A36109050 Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim uni As New DataTable Dim baris As DataRow Dim cobaji As New OleDb.OleDbDataAdapter Private Sub Form25A36109050_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load cobaji = New OleDb.OleDbDataAdapter("select * from BARANG", konek) cobaji.Fill(uni) DataGridView1.DataSource = uni End Sub Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Form25B36109050.Visible = False Then Form25B36109050.Show() Else Form25B36109050.Activate() End If baris = uni.DefaultView(BindingContext(uni).Position).Row Form25B36109050.TextBox1.Text = baris("KODEBARANG") Form25B36109050.TextBox2.Text = baris("NAMABARANG") Form25B36109050.TextBox3.Text = baris("HARGAJUAL") Form25B36109050.TextBox4.Text = baris("PERSEDIAANAWAL") Form25B36109050.AmbilData() End Sub End Class
Public Class Form25B36109050 Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tesji As New DataTable Dim cobaji As New OleDb.OleDbDataAdapter Public Sub AmbilData() cobaji = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox1.Text & "'", konek) cobaji.Fill(tesji) End Sub Private Sub Form25B36109050_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DataGridView1.DataSource = tesji End Sub End Class
Public Class Form26A36109050 Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim uni As New DataTable Dim baris As DataRow Dim cobaji As New OleDb.OleDbDataAdapter Private Sub Form26A36109050_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load cobaji = New OleDb.OleDbDataAdapter("select * from BARANG", konek) cobaji.Fill(uni) DataGridView1.DataSource = uni End Sub Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Form26B36109050.Visible = False Then Form26B36109050.Show() Else Form26B36109050.Activate() End If baris = uni.DefaultView(BindingContext(uni).Position).Row Form26B36109050.TextBox1.Text = baris("KODEBARANG") Form26B36109050.TextBox2.Text = baris("NAMABARANG") Form26B36109050.TextBox3.Text = baris("HARGAJUAL") Form26B36109050.TextBox4.Text = baris("PERSEDIAANAWAL") Form26B36109050.AmbilData() End Sub End Class
Public Class Form26B36109050 Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tesji As New DataTable Dim cobaji As New OleDb.OleDbDataAdapter Public Sub AmbilData() cobaji = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox1.Text & "'", konek) cobaji.Fill(tesji) Dim tu, total As Integer For Each x As DataRow In tesji.Rows tu = tu + x("UNIT") total = total + x("HARGA") Next TextBox5.Text = tu TextBox6.Text = total End Sub Private Sub Form26B36109050_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DataGridView1.DataSource = tesji End Sub End Class
Public Class LATIHAN01936109038 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Icha As New DataTable Private Sub LATIHAN01936109038_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = 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", CONECT) adapter.Fill(Icha) DataGridView136109038.DataSource = Icha End Sub End Class
LATIHAN 020 36109038
Public Class LATIHAN02036109038 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Icha As New DataTable Private Sub LATIHAN02036109038_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = 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", CONECT) adapter.Fill(Icha) DataGridView136109038.DataSource = Icha End Sub End Class
LATIHAN 021 36109038
Public Class LATIHAN02136109038 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Icha As New DataTable Dim Ichaanak As New DataTable Dim datset As New DataSet Dim bin As New BindingSource Dim bin2 As New BindingSource Private Sub LATIHAN02136109038_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim coba As New OleDb.OleDbDataAdapter Dim coba2 As New OleDb.OleDbDataAdapter coba = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", CONECT) coba.Fill(Icha) coba2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", CONECT) coba2.Fill(Ichaanak) Icha.TableName = "induknya" Ichaanak.TableName = "anaknya" datset.Tables.Add(Icha) datset.Tables.Add(Ichaanak) datset.Relations.Add(New DataRelation("coba", datset.Tables("induknya").Columns("NOTRANS"), datset.Tables("anaknya").Columns("NOTRANS"))) bin.DataSource = datset bin.DataMember = "induknya" bin2.DataSource = bin bin2.DataMember = "coba" DataGridView136109038.DataSource = bin DataGridView236109038.DataSource = bin2 End Sub End Class
Public Class LATIHAN015_36109049 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim wirda As New DataTable Private Sub LATIHAN01536109049_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select * from barang", CONECT) adapter.Fill(wirda) DGV1_36109049.DataSource = wirda End Sub
End Class
Public Class LATIHAN016_36109049
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim wirda As New DataTable Private Sub LATIHAN01536109049_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select * from mastertransaksi", CONECT) adapter.Fill(wirda) DGV1_36109049.DataSource = wirda End Sub
Private Sub DGV1_36109049_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DGV1_36109049.CellContentClick
End Sub End Class
Public Class LATIHAN017_36109049
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim wirda As New DataTable Private Sub LATIHAN01536109049_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select * from detailtransaksi", CONECT) adapter.Fill(wirda) DGV1_36109049.DataSource = wirda End Sub
End Class Public Class LATIHAN018_36109049 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim wirda As New DataTable Private Sub LATIHAN01836109049_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang", CONECT) adapter.Fill(wirda) DGV1_36109049.DataSource = wirda End Sub
Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DGV1_36109049.CellContentClick
Public Class LATIHAN02236109038 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Icha As New DataTable Dim Ichaanak As New DataTable Dim datset As New DataSet Dim bin As New BindingSource Dim bin2 As New BindingSource Private Sub LATIHAN02236109038_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim coba As New OleDb.OleDbDataAdapter Dim coba2 As New OleDb.OleDbDataAdapter coba = New OleDb.OleDbDataAdapter("select * from BARANG ", CONECT) coba.Fill(Icha) coba2 = New OleDb.OleDbDataAdapter("select detailtransaksi.notrans, detailtransaksi.harga, detailtransaksi.unit, 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", CONECT) coba2.Fill(Ichaanak) Icha.TableName = "induknya" Ichaanak.TableName = "anaknya" datset.Tables.Add(Icha) datset.Tables.Add(Ichaanak) datset.Relations.Add(New DataRelation("coba", datset.Tables("induknya").Columns("KODEBARANG"), datset.Tables("anaknya").Columns("KODEBARANG"))) bin.DataSource = datset bin.DataMember = "induknya" bin2.DataSource = bin bin2.DataMember = "coba" DataGridView1.DataSource = bin DataGridView2.DataSource = bin2 End Sub End Class
LATIHAN 023A 36109038
Public Class LATIHAN023A36109038 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Icha As New DataTable Dim baris As DataRow Private Sub LATIHAN023A36109038_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim coba As New OleDb.OleDbDataAdapter coba = New OleDb.OleDbDataAdapter("select * from MASTERTRANSAKSI", CONECT) coba.Fill(Icha) DataGridView1.DataSource = Icha End Sub Private Sub BUTTON1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BUTTON1.Click If LATIHAN023B36109038.Visible = False Then LATIHAN023B36109038.Show() Else LATIHAN023B36109038.Activate() End If baris = Icha.DefaultView(BindingContext(Icha).Position).Row LATIHAN023B36109038.TextBox1.Text = baris("notrans") LATIHAN023B36109038.TextBox2.Text = baris("jenistransaksi") LATIHAN023B36109038.DateTimePicker1.Value = baris("tanggaltransaksi") LATIHAN023B36109038.AmbilData() End Sub End Class
LATIHAN 023B 36109038
Public Class LATIHAN023B36109038 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tesji As New DataTable Dim coba As New OleDb.OleDbDataAdapter Public Sub AmbilData() coba = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where NOTRANS ='" & TextBox1.Text & "'", CONECT) coba.Fill(tesji) End Sub Private Sub LATIHAN023B36109038_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DataGridView1.DataSource = tesji End Sub End Class
Public Class LATIHAN025B36109038 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tesji As New DataTable Dim coba As New OleDb.OleDbDataAdapter Public Sub AmbilData() coba = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox1.Text & "'", CONECT) coba.Fill(tesji) End Sub
Private Sub latihan25B3619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DataGridView1.DataSource = tesji End Sub End Class
LATIHAN 026A 36109038
Public Class LATIHAN026A36109038 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Icha As New DataTable Dim baris As DataRow Dim coba As New OleDb.OleDbDataAdapter Private Sub latihan26A3619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load coba = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang", CONECT) coba.Fill(Icha) DataGridView1.DataSource = Icha End Sub Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If LATIHAN026B36109038.Visible = False Then LATIHAN026B36109038.Show() Else LATIHAN026B36109038.Activate() End If baris = Icha.DefaultView(BindingContext(Icha).Position).Row LATIHAN026B36109038.TextBox1.Text = baris("KODEBARANG") LATIHAN026B36109038.TextBox2.Text = baris("NAMABARANG") LATIHAN026B36109038.TextBox3.Text = baris("HARGAJUAL") LATIHAN026B36109038.TextBox4.Text = baris("PERSEDIAANAWAL") LATIHAN026B36109038.AmbilData() End Sub End Class
LATIHAN 026B 36109038
Public Class LATIHAN026B36109038 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tesji As New DataTable Dim coba As New OleDb.OleDbDataAdapter Public Sub AmbilData() coba = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox1.Text & "'", CONECT) coba.Fill(tesji) Dim tu, total As Integer For Each x As DataRow In tesji.Rows tu = tu + x("UNIT") total = total + x("HARGA") Next TextBox5.Text = tu TextBox6.Text = total End Sub Private Sub latihan26B3619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DataGridView1.DataSource = tesji End Sub End Class
Public Class LATIHAN01536109029 Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim cute As New DataTable
Private Sub LATIHAN01536109029_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select * from barang", connect) adapter.Fill(cute) DataGridView1.DataSource = cute End Sub
Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick
End Sub End Class
Public Class LATIHAN01636109029 Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim cute As New DataTable
Private Sub LATIHAN01636109029_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select * from mastertransaksi", connect) adapter.Fill(cute) DataGridView1.DataSource = cute End Sub
Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick
End Sub End Class
Public Class LATIHAN01736109029 Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim cute As New DataTable
Private Sub LATIHAN01736109029_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select * from detailtransaksi", connect) adapter.Fill(cute) DataGridView1.DataSource = cute End Sub
Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick
End Sub End Class
Public Class latihan183619029 Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim cute As New DataTable
Private Sub latihan183619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang ", connect) cobaji.Fill(cute) DataGridView1.DataSource = cute End Sub End Class
Dim Jembatan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source= D:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb") Dim Bakpenampung As New DataTable
Private Sub Latihan01536109054_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim X As New OleDb.OleDbDataAdapter X = New OleDb.OleDbDataAdapter("select* from barang", Jembatan) X.Fill(Bakpenampung) X.Dispose()
DataGridView136109054.DataSource = Bakpenampung
End Sub End Class
Public Class LATIHAN01636109054
Dim Jembatan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source= D:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb") Dim Bakpenampung As New DataTable
Private Sub Latihan01636109054_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim X As New OleDb.OleDbDataAdapter X = New OleDb.OleDbDataAdapter("select* FROM MASTERTRANSAKSI", Jembatan) X.Fill(Bakpenampung) X.Dispose()
DataGridView136109054.DataSource = Bakpenampung
End Sub End Class
Public Class LATIHAN01736109054
Dim Jembatan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source= D:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb") Dim Bakpenampung As New DataTable
Private Sub Latihan01736109054_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim X As New OleDb.OleDbDataAdapter X = New OleDb.OleDbDataAdapter("select* FROM DETAILTRANSAKSI", Jembatan) X.Fill(Bakpenampung) X.Dispose()
DataGridView136109054.DataSource = Bakpenampung End Sub End Class
Dim Jembatan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source= d:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb") Dim Bakpenampung As New DataTable
Private Sub Latihan01836109054_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim X As New OleDb.OleDbDataAdapter X = New OleDb.OleDbDataAdapter("select detailtransaksi.notrans,Detailtransaksi.Unit,detailtransaksi.Harga,barang.namabarang,barang.kodebarang from detailTransaksi Inner Join Barang On Detailtransaksi.kodebarang = barang.kodebarang", Jembatan) X.Fill(Bakpenampung) X.Dispose()
DataGridView136109054.DataSource = Bakpenampung End Sub End Class
Public Class LATIHAN01901236109054
Dim Jembatan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source= d:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb") Dim Bakpenampung As New DataTable
Private Sub Latihan01936109054_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim X As New OleDb.OleDbDataAdapter X = 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", Jembatan) X.Fill(Bakpenampung) X.Dispose()
DataGridView136109054.DataSource = Bakpenampung End Sub End Class
Public Class LATIHAN02036109054
Dim Jembatan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source= d:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb") Dim Bakpenampung As New DataTable
Private Sub Latihan02036109054_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim X As New OleDb.OleDbDataAdapter X = 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", Jembatan) X.Fill(Bakpenampung) X.Dispose()
DataGridView136109054.DataSource = Bakpenampung End Sub End Class
Dim Konek As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =d:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb") Dim Bak As New DataTable Dim Mandi As New DataTable Dim dtset As New DataSet Dim bs1 As New BindingSource Dim bs2 As New BindingSource
Private Sub Latihan02136109054_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim x As New OleDb.OleDbDataAdapter x = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", Konek) x.Fill(Bak) x.Dispose() Dim y As New OleDb.OleDbDataAdapter y = New OleDb.OleDbDataAdapter("select * from DETAILTRANSAKSI ", Konek) y.Fill(Mandi) y.Dispose() Bak.TableName = "ibu" Mandi.TableName = "anak" dtset.Tables.Add(Bak) dtset.Tables.Add(Mandi) dtset.Relations.Add(New DataRelation("hubung1", dtset.Tables("ibu").Columns("NOTRANS"), dtset.Tables("anak").Columns("NOTRANS"))) bs1.DataSource = dtset bs1.DataMember = "ibu" bs2.DataSource = bs1 bs2.DataMember = "hubung1" DataGridView136109054.DataSource = bs1 DataGridView236109054.DataSource = bs2
End Sub End Class
Public Class LATIHAN02236109054
Dim Konek As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =d:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb") Dim Bak As New DataTable Dim Mandi As New DataTable Dim dtset As New DataSet Dim bs1 As New BindingSource Dim bs2 As New BindingSource
Private Sub Latihan02236109054_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim x As New OleDb.OleDbDataAdapter x = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", Konek) x.Fill(Bak) x.Dispose() Dim y As New OleDb.OleDbDataAdapter y = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG,DETAILTRANSAKSI.UNIT,DETAILTRANSAKSI.HARGA,BARANG.NAMABARANG, UNIT * HARGA AS JUMLAHREALISASI, UNIT * HARGAJUAL AS JUMLAHSTANDAR FROM DETAILTRANSAKSI INNER JOIN BARANG ON DETAILTRANSAKSI.KODEBARANG = BARANG.KODEBARANG ", Konek) y.Fill(Mandi) y.Dispose() Bak.TableName = "ibu" Mandi.TableName = "anak" dtset.Tables.Add(Bak) dtset.Tables.Add(Mandi) dtset.Relations.Add(New DataRelation("hubung1", dtset.Tables("ibu").Columns("NOTRANS"), dtset.Tables("anak").Columns("NOTRANS"))) bs1.DataSource = dtset bs1.DataMember = "ibu" bs2.DataSource = bs1 bs2.DataMember = "hubung1" DataGridView136109054.DataSource = bs1 DataGridView236109054.DataSource = bs2
Dim Kendaraan As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =d:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb") Dim Penampung As New DataTable Private Sub Latihan023A36109054_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim Mobil As New OleDb.OleDbDataAdapter Mobil = New OleDb.OleDbDataAdapter("SELECT * FROM MASTERTRANSAKSI", Kendaraan) Penampung.Rows.Clear() Mobil.Fill(Penampung) Mobil.Dispose()
DataGridView136109054.DataSource = Penampung End Sub
Private Sub KLIKK36109054_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KLIKK36109054.Click LATIHAN023B36109054.Show() LATIHAN023B36109054.TextBox136109054.Text = DataGridView136109054.CurrentRow.Cells("NOTRANS").Value LATIHAN023B36109054.DateTimePicker136109054.Text = DataGridView136109054.CurrentRow.Cells("TANGGALTRANSAKSI").Value LATIHAN023B36109054.TextBox336109054.Text = DataGridView136109054.CurrentRow.Cells("JENISTRANSAKSI").Value
LATIHAN023B36109054.AmbilDataDetail() End Sub End Class
Public Class LATIHAN023B36109054
Dim Kendaraan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source= D:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb") Dim Penampung As New DataTable Public Sub AmbilDataDetail() Dim x As New OleDb.OleDbDataAdapter x = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where NOTRANS ='" & TextBox136109054.Text & "'", Kendaraan) Penampung.Rows.Clear() x.Fill(Penampung) x.Dispose()
End Sub Private Sub Latihan023B361090542_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilDataDetail() DGV136109054.DataSource = Penampung
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim TRIES As New DataTable Private Sub latihan1536109048_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select * from barang", CONECT) cobaji.Fill(TRIES) DGV136109048.DataSource = TRIES End Sub End Class
Public Class LATIHAN01636109048
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim TRIES As New DataTable Private Sub latihan163610948_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", CONECT) cobaji.Fill(TRIES) DGV136109048.DataSource = TRIES End Sub End Class
Public Class LATIHAN01736109048
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim TRIES As New DataTable
Private Sub latihan173610948_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", CONECT) cobaji.Fill(TRIES) DGV136109048.DataSource = TRIES End Sub End Class
Public Class LATIHAN01836109048
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim TRIES As New DataTable
Private Sub latihan183619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang ", CONECT) cobaji.Fill(TRIES) DGV136109048.DataSource = TRIES End Sub End Class
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim TRIES As New DataTable Private Sub latihan1936109048_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.kodebarang, detailtransaksi.unit, detailtransaksi.harga from mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans ", CONECT) cobaji.Fill(TRIES) DGV136109048.DataSource = TRIES End Sub End Class
Public Class LATIHAN02036109048
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim TRIES As New DataTable Private Sub latihan2036109048_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select 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 ", CONECT) cobaji.Fill(TRIES) DGV136109048.DataSource = TRIES End Sub End Class
Public Class LATIHAN02136109048
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim TRIES As New DataTable Dim TRIESNOVIANTY As New DataTable Dim datset As New DataSet Dim bin As New BindingSource Dim bin2 As New BindingSource Private Sub latihan213619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter Dim cobaji2 As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", CONECT) cobaji.Fill(TRIES) cobaji2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", CONECT) cobaji2.Fill(TRIESNOVIANTY) TRIES.TableName = "induknya" TRIESNOVIANTY.TableName = "anaknya" datset.Tables.Add(TRIES) datset.Tables.Add(TRIESNOVIANTY) datset.Relations.Add(New DataRelation("cobaji", datset.Tables("induknya").Columns("NOTRANS"), datset.Tables("anaknya").Columns("NOTRANS"))) bin.DataSource = datset bin.DataMember = "induknya" bin2.DataSource = bin bin2.DataMember = "cobaji" DGV136109048.DataSource = bin DGV236109048.DataSource = bin2 End Sub End Class
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim TRIES As New DataTable Dim TRIESNOVIANTY As New DataTable Dim datset As New DataSet Dim bin As New BindingSource Dim bin2 As New BindingSource Private Sub latihan2236109048_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim BUKU As New OleDb.OleDbDataAdapter Dim PULPEN As New OleDb.OleDbDataAdapter BUKU = New OleDb.OleDbDataAdapter("select * from BARANG ", CONECT) BUKU.Fill(TRIES) PULPEN = New OleDb.OleDbDataAdapter("select detailtransaksi.notrans, detailtransaksi.harga, detailtransaksi.unit, 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", CONECT) PULPEN.Fill(TRIESNOVIANTY) TRIES.TableName = "induknya" TRIESNOVIANTY.TableName = "anaknya" datset.Tables.Add(TRIES) datset.Tables.Add(TRIESNOVIANTY) datset.Relations.Add(New DataRelation("cobaji", datset.Tables("induknya").Columns("KODEBARANG"), datset.Tables("anaknya").Columns("KODEBARANG"))) bin.DataSource = datset bin.DataMember = "induknya" bin2.DataSource = bin bin2.DataMember = "cobaji" DGV136109048.DataSource = bin DGV236109048.DataSource = bin2 End Sub
End Class
Public Class LATIHAN023A36109048
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim TRIES As New DataTable Dim baris As DataRow Private Sub LATIHAN023A36109048_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select * from MASTERTRANSAKSI", konek) cobaji.Fill(TRIES) DGV136109048.DataSource = TRIES End Sub Private Sub BUTTON1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KLIK36109048.Click If LATIHAN023B36109048.Visible = False Then LATIHAN023B36109048.Show() Else LATIHAN023B36109048.Activate() End If baris = TRIES.DefaultView(BindingContext(TRIES).Position).Row LATIHAN023B36109048.TextBox136109048.Text = baris("notrans") LATIHAN023B36109048.TextBox236109048.Text = baris("jenistransaksi") LATIHAN023B36109048.DTP136109048.Value = baris("tanggaltransaksi") LATIHAN023B36109048.AmbilData() End Sub
End Class
Public Class LATIHAN023B36109048
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim BAJU As New DataTable Dim cobaji As New OleDb.OleDbDataAdapter Public Sub AmbilData() cobaji = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where NOTRANS ='" & TextBox136109048.Text & "'", konek) cobaji.Fill(BAJU) End Sub Private Sub latihan023B36109048_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DGV136109048.DataSource = BAJU End Sub End Class
Dim konek As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =d:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb") Dim sukma As New DataTable Dim baris As DataRow Dim cobaji As New OleDb.OleDbDataAdapter Private Sub latihan25A3619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load cobaji = New OleDb.OleDbDataAdapter("select * from BARANG", konek) cobaji.Fill(sukma) DataGridView136109054.DataSource = sukma End Sub Private Sub butoon2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109054.Click If LATIHAN025B36109054.Visible = False Then LATIHAN025B36109054.Show() Else LATIHAN025B36109054.Activate() End If baris = sukma.DefaultView(BindingContext(sukma).Position).Row LATIHAN025B36109054.TextBox136109054.Text = baris("KODEBARANG") LATIHAN025B36109054.TextBox236109054.Text = baris("NAMABARANG") LATIHAN025B36109054.TextBox336109054.Text = baris("HARGAJUAL") LATIHAN025B36109054.TextBox436109054.Text = baris("PERSEDIAANAWAL") LATIHAN025B36109054.AmbilData() End Sub End Class
Public Class LATIHAN025B36109054
Dim konek As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =d:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb") Dim tesji As New DataTable Dim cobaji As New OleDb.OleDbDataAdapter Public Sub AmbilData() cobaji = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109054.Text & "'", konek) cobaji.Fill(tesji) End Sub
Private Sub latihan025B36109054_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DataGridView136109054.DataSource = tesji End Sub End Class
Public Class LATIHAN01536109033 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Tiwi As New DataTable Private Sub LATIHAN01536109033_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select * from BARANG", CONECT) adapter.Fill(Tiwi) DataGridView1.DataSource = Tiwi End Sub End Class
Public Class LATIHAN01636109033 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Tiwi As New DataTable Private Sub LATIHAN01636109033_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select * from MASTERTRANSAKSI", CONECT) adapter.Fill(Tiwi) DataGridView1.DataSource = Tiwi End Sub End Class
Public Class LATIHAN01736109033 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Tiwi As New DataTable Private Sub LATIHAN01736109033_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select * from DETAILTRANSAKSI", CONECT) adapter.Fill(Tiwi) DataGridView1.DataSource = Tiwi End Sub End Class
Public Class LATIHAN01836109033 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Tiwi As New DataTable
Private Sub LATIHAN01836109033_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang", CONECT) adapter.Fill(Tiwi) DataGridView1.DataSource = Tiwi End Sub End Class
Dim konek As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =d:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb") Dim sukma As New DataTable Dim baris As DataRow Dim cobaji As New OleDb.OleDbDataAdapter Private Sub latihan026A36109054_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load cobaji = New OleDb.OleDbDataAdapter("select * from BARANG", konek) cobaji.Fill(sukma) DataGridView136109054.DataSource = sukma End Sub Private Sub button136109054_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109054.Click If LATIHAN026B36109054.Visible = False Then LATIHAN026B36109054.Show() Else LATIHAN026B36109054.Activate() End If baris = sukma.DefaultView(BindingContext(sukma).Position).Row LATIHAN026B36109054.TextBox136109054.Text = baris("KODEBARANG") LATIHAN026B36109054.TextBox236109054.Text = baris("NAMABARANG") LATIHAN026B36109054.TextBox336109054.Text = baris("HARGAJUAL") LATIHAN026B36109054.TextBox436109054.Text = baris("PERSEDIAANAWAL") LATIHAN026B36109054.AmbilData() End Sub End Class
Public Class LATIHAN026B36109054
Dim konek As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =d:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb") Dim tesji As New DataTable Dim cobaji As New OleDb.OleDbDataAdapter Public Sub AmbilData() cobaji = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109054.Text & "'", konek) cobaji.Fill(tesji) Dim tu, total As Integer For Each x As DataRow In tesji.Rows tu = tu + x("UNIT") total = total + x("HARGA") Next TextBox536109054.Text = tu TextBox636109054.Text = total End Sub Private Sub latihan026B36109054_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DataGridView136109054.DataSource = tesji End Sub End Class
Public Class Latihan1536109046 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Eshafitri As New DataTable
Private Sub Latihan1536109046_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim juzttryboo As New OleDb.OleDbDataAdapter juzttryboo = New OleDb.OleDbDataAdapter("select * from barang", conect) juzttryboo.Fill(Eshafitri) DataGridView136109046.DataSource = Eshafitri End Sub End Class
Public Class Latihan1636109046 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Eshafitri As New DataTable Private Sub Latihan1636109046_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim juzttryboo As New OleDb.OleDbDataAdapter juzttryboo = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", conect) juzttryboo.Fill(Eshafitri) DataGridView136109046.DataSource = Eshafitri End Sub End Class
Public Class Latihan1736109046 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Eshafitri As New DataTable
Private Sub Latihan1736109046_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim juzttryboo As New OleDb.OleDbDataAdapter juzttryboo = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", conect) juzttryboo.Fill(Eshafitri) DataGridView136109046.DataSource = Eshafitri End Sub End Class
Public Class Latihan1836109046 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Eshafitri As New DataTable
Private Sub Latihan1836109046_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim juzttryboo As New OleDb.OleDbDataAdapter juzttryboo = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang ", conect) juzttryboo.Fill(Eshafitri) DataGridView136109046.DataSource = Eshafitri End Sub End Class
Public Class Latihan1936109046 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Eshafitri As New DataTable Private Sub Latihan1936109046_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim juzttryboo As New OleDb.OleDbDataAdapter juzttryboo = 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 ", conect) juzttryboo.Fill(Eshafitri) DataGridView136109046.DataSource = Eshafitri End Sub End Class
Public Class Latihan2036109046 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Eshafitri As New DataTable Private Sub Latihan2036109046_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim juzttryboo As New OleDb.OleDbDataAdapter juzttryboo = 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 ", conect) juzttryboo.Fill(Eshafitri) DataGridView136109046.DataSource = Eshafitri End Sub End Class
Public Class Latihan2136109046 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Eshafitri As New DataTable Dim Eshafitrianak As New DataTable Dim datset As New DataSet Dim bin As New BindingSource Dim bin2 As New BindingSource Private Sub Latihan2136109046_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim juzttryboo As New OleDb.OleDbDataAdapter Dim juzttryboo2 As New OleDb.OleDbDataAdapter juzttryboo = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", conect) juzttryboo.Fill(Eshafitri) juzttryboo2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", conect) juzttryboo2.Fill(Eshafitrianak) Eshafitri.TableName = "induknya" Eshafitrianak.TableName = "anaknya" datset.Tables.Add(Eshafitri) datset.Tables.Add(Eshafitrianak) datset.Relations.Add(New DataRelation("cobaji", datset.Tables("induknya").Columns("NOTRANS"), datset.Tables("anaknya").Columns("NOTRANS"))) bin.DataSource = datset bin.DataMember = "induknya" bin2.DataSource = bin bin2.DataMember = "cobaji" DataGridView136109046.DataSource = bin DataGridView236109046.DataSource = bin2 End Sub End Class
Dim konek As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =d:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb") Dim sukma As New DataTable Dim baris As DataRow
Private Sub latihan024A36109054_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select * from BARANG", konek) cobaji.Fill(sukma) DataGridView136109054.DataSource = sukma End Sub
Private Sub butoon236109054_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butoon236109054.Click If LATIHAN024B36109054.Visible = False Then LATIHAN024B36109054.Show() Else LATIHAN024B36109054.Activate() End If baris = sukma.DefaultView(BindingContext(sukma).Position).Row LATIHAN024B36109054.TextBox136109054.Text = baris("KODEBARANG") LATIHAN024B36109054.TextBox236109054.Text = baris("NAMABARANG") LATIHAN024B36109054.TextBox336109054.Text = baris("HARGAJUAL") LATIHAN024B36109054.TextBox436109054.Text = baris("PERSEDIAANAWAL") LATIHAN024B36109054.AmbilData() End Sub End Class
Public Class LATIHAN024B36109054
Dim konek As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =d:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb") Dim tesji As New DataTable Dim cobaji As New OleDb.OleDbDataAdapter Public Sub AmbilData() cobaji = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109054.Text & "'", konek) cobaji.Fill(tesji) End Sub
Private Sub latihan24B3619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DataGridView136109054.DataSource = tesji End Sub End Class
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Tiwi As New DataTable Private Sub LATIHAN019361090333_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = 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", CONECT) adapter.Fill(Tiwi) DataGridView1.DataSource = Tiwi End Sub End Class
Public Class LATIHAN02036109033
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Tiwi As New DataTable Private Sub LATIHAN02036109033_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = 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", CONECT) adapter.Fill(Tiwi) DataGridView1.DataSource = Tiwi
End Sub End Class
Public Class LATIHAN02136109033
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tiwi As New DataTable Dim tiwianak As New DataTable Dim datset As New DataSet Dim binding As New BindingSource Dim binding2 As New BindingSource Private Sub LATIHAN02136109033_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter Dim cobaji2 As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", CONECT) cobaji.Fill(tiwi) cobaji2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", CONECT) cobaji2.Fill(tiwianak) tiwi.TableName = "induknya" tiwianak.TableName = "anaknya" datset.Tables.Add(tiwi) datset.Tables.Add(tiwianak) datset.Relations.Add(New DataRelation("cobaji", datset.Tables("induknya").Columns("NOTRANS"), datset.Tables("anaknya").Columns("NOTRANS"))) binding.DataSource = datset binding.DataMember = "induknya" binding2.DataSource = binding binding2.DataMember = "cobaji" DataGridView1.DataSource = binding DataGridView2.DataSource = binding2
Public Class Latihan2236109046 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Eshafitri As New DataTable Dim Eshafitrianak As New DataTable Dim datset As New DataSet Dim bin As New BindingSource Dim bin2 As New BindingSource Private Sub Latihan2236109046_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim juzttryboo As New OleDb.OleDbDataAdapter Dim juzttryboo2 As New OleDb.OleDbDataAdapter juzttryboo = New OleDb.OleDbDataAdapter("select * from BARANG ", conect) juzttryboo.Fill(Eshafitri) juzttryboo2 = New OleDb.OleDbDataAdapter("select detailtransaksi.notrans, detailtransaksi.harga, detailtransaksi.unit, 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", conect) juzttryboo2.Fill(Eshafitrianak) Eshafitri.TableName = "induknya" Eshafitrianak.TableName = "anaknya" datset.Tables.Add(Eshafitri) datset.Tables.Add(Eshafitrianak) datset.Relations.Add(New DataRelation("cobaji", datset.Tables("induknya").Columns("KODEBARANG"), datset.Tables("anaknya").Columns("KODEBARANG"))) bin.DataSource = datset bin.DataMember = "induknya" bin2.DataSource = bin bin2.DataMember = "cobaji" DataGridView136109046.DataSource = bin DataGridView236109046.DataSource = bin2 End Sub End Class
Public Class Latihan23A36109046 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Eshafitri As New DataTable Dim baris As DataRow Private Sub Latihan23A36109046_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select * from MASTERTRANSAKSI", conect) cobaji.Fill(Eshafitri) DataGridView136109046.DataSource = Eshafitri End Sub Private Sub Button36109046_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button36109046.Click If Latihan23B36109046.Visible = False Then Latihan23B36109046.Show() Else Latihan23B36109046.Activate() End If baris = Eshafitri.DefaultView(BindingContext(Eshafitri).Position).Row Latihan23B36109046.TextBox136109046.Text = baris("notrans") Latihan23B36109046.TextBox36109046.Text = baris("jenistransaksi") Latihan23B36109046.DateTimePicker36109046.Value = baris("tanggaltransaksi") Latihan23B36109046.AmbilData() End Sub End Class
Public Class Latihan23B36109046 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim juzttryboo As New DataTable Dim juzttryboo2 As New OleDb.OleDbDataAdapter Public Sub AmbilData() juzttryboo2 = New OleDb.OleDbDataAdapter("select * from DETAILTRANSAKSI where NOTRANS ='" & TextBox136109046.Text & "'", conect) juzttryboo2.Fill(juzttryboo) End Sub Private Sub Latihan23B36109046_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DataGridView136109046.DataSource = juzttryboo End Sub End Class
Public Class Latihan24A36109046 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Eshafitri As New DataTable Dim baris As DataRow
Private Sub latihan24A3619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select * from BARANG", conect) cobaji.Fill(Eshafitri) DataGridView136109046.DataSource = Eshafitri End Sub
Private Sub button136109046_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button136109046.Click If Latihan24B36109046.Visible = False Then Latihan24B36109046.Show() Else Latihan24B36109046.Activate() End If baris = Eshafitri.DefaultView(BindingContext(Eshafitri).Position).Row Latihan24B36109046.TextBox136109046.Text = baris("KODEBARANG") Latihan24B36109046.TextBox236109046.Text = baris("NAMABARANG") Latihan24B36109046.TextBox336109046.Text = baris("HARGAJUAL") Latihan24B36109046.TextBox436109046.Text = baris("PERSEDIAANAWAL") Latihan24B36109046.AmbilData() End Sub End Class
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim TRIES As New DataTable Dim baris As DataRow
Private Sub latihan24A36109048_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select * from BARANG", CONECT) cobaji.Fill(TRIES) DGV136109048.DataSource = TRIES End Sub
Private Sub butoon2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BUTTON236109048.Click If LATIHAN024B36109048.Visible = False Then LATIHAN024B36109048.Show() Else LATIHAN024B36109048.Activate() End If baris = TRIES.DefaultView(BindingContext(TRIES).Position).Row LATIHAN024B36109048.TextBox136109048.Text = baris("KODEBARANG") LATIHAN024B36109048.TextBox236109048.Text = baris("NAMABARANG") LATIHAN024B36109048.TextBox336109048.Text = baris("HARGAJUAL") LATIHAN024B36109048.TextBox436109048.Text = baris("PERSEDIAANAWAL") LATIHAN024B36109048.AmbilData() End Sub End Class
Public Class LATIHAN024B36109048
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim BANANA As New DataTable Dim DURIAN As New OleDb.OleDbDataAdapter Public Sub AmbilData() DURIAN = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where NOTRANS ='" & TextBox136109048.Text & "'", konek) DURIAN.Fill(BANANA) End Sub Private Sub latihan024B36109048_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DGV136109048.DataSource = BANANA End Sub
End Class
Public Class LATIHAN025A36109048
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim TRIES As New DataTable Dim baris As DataRow Dim RUMAH As New OleDb.OleDbDataAdapter Private Sub latihan25A36109048_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load RUMAH = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang ", CONECT) RUMAH.Fill(TRIES) DGV136109048.DataSource = TRIES End Sub Private Sub butoon2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109048.Click If LATIHAN025B36109048.Visible = False Then LATIHAN025B36109048.Show() Else LATIHAN025B36109048.Activate() End If baris = TRIES.DefaultView(BindingContext(TRIES).Position).Row LATIHAN025B36109048.TextBox136109048.Text = baris("KODEBARANG") LATIHAN025B36109048.TextBox236109048.Text = baris("NAMABARANG") LATIHAN025B36109048.TextBox336109048.Text = baris("HARGAJUAL") LATIHAN025B36109048.TextBox436109048.Text = baris("PERSEDIAANAWAL") LATIHAN025B36109048.AmbilData() End Sub
Public Class Latihan24B36109046 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim juzttryboo As New DataTable Dim juzttryboo2 As New OleDb.OleDbDataAdapter Public Sub AmbilData() juzttryboo2 = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109046.Text & "'", conect) juzttryboo2.Fill(juzttryboo) End Sub
Private Sub Latihan24B3619046_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DataGridView136109046.DataSource = juzttryboo End Sub End Class
Public Class Latihan25A36109046 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Eshafitri As New DataTable Dim baris As DataRow Dim juzttryboo As New OleDb.OleDbDataAdapter Private Sub latihan25A3619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load juzttryboo = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang ", conect) juzttryboo.Fill(Eshafitri) DataGridView136109046.DataSource = Eshafitri End Sub Private Sub Button136109046_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109046.Click If Latihan25B36109046.Visible = False Then Latihan25B36109046.Show() Else Latihan25B36109046.Activate() End If baris = Eshafitri.DefaultView(BindingContext(Eshafitri).Position).Row Latihan25B36109046.TextBox136109046.Text = baris("KODEBARANG") Latihan25B36109046.TextBox236109046.Text = baris("NAMABARANG") Latihan25B36109046.TextBox336109046.Text = baris("HARGAJUAL") Latihan25B36109046.TextBox436109046.Text = baris("PERSEDIAANAWAL") Latihan25B36109046.AmbilData() End Sub End Class
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim UNGU As New DataTable Dim BIRU As New OleDb.OleDbDataAdapter Public Sub AmbilData() BIRU = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA,(DETAILTRANSAKSI.UNIT * DETAILTRANSAKSI.HARGA)as Jumlah from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109048.Text & "'", CONECT) BIRU.Fill(UNGU) End Sub
Private Sub latihan025B36109048_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DGV136109048.DataSource = UNGU End Sub
End Class
Public Class LATIHAN026A36109048
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim TRIES As New DataTable Dim baris As DataRow Dim CANTIK As New OleDb.OleDbDataAdapter Private Sub latihan26A36109048_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load CANTIK = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang", CONECT) CANTIK.Fill(TRIES) DGV136109048.DataSource = TRIES End Sub Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109048.Click If LATIHAN026B36109048.Visible = False Then LATIHAN026B36109048.Show() Else LATIHAN026B36109048.Activate() End If baris = TRIES.DefaultView(BindingContext(TRIES).Position).Row LATIHAN026B36109048.TextBox136109048.Text = baris("KODEBARANG") LATIHAN026B36109048.TextBox236109048.Text = baris("NAMABARANG") LATIHAN026B36109048.TextBox336109048.Text = baris("HARGAJUAL") LATIHAN026B36109048.TextBox436109048.Text = baris("PERSEDIAANAWAL") LATIHAN026B36109048.AmbilData() End Sub End Class
Public Class LATIHAN026B36109048
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim MEJA As New DataTable Dim KURSI As New OleDb.OleDbDataAdapter Public Sub AmbilData() KURSI = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA,(DETAILTRANSAKSI.UNIT * DETAILTRANSAKSI.HARGA)as Jumlah from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109048.Text & "'", CONECT) KURSI.Fill(MEJA) Dim tu, total As Integer For Each x As DataRow In MEJA.Rows tu = tu + x("UNIT") total = total + x("jumlah") Next TextBox5.Text = tu TextBox6.Text = total End Sub Private Sub latihan026B36109048_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DGV136109048.DataSource = MEJA End Sub End Class
Public Class LATIHAN02236109033 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tiwi As New DataTable Dim tiwianak As New DataTable Dim datset As New DataSet Dim binding As New BindingSource Dim binding2 As New BindingSource
Private Sub LATIHAN02236109033_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobaji As New OleDb.OleDbDataAdapter Dim cobacoba As New OleDb.OleDbDataAdapter cobaji = New OleDb.OleDbDataAdapter("select * from BARANG ", CONECT) cobaji.Fill(tiwi) cobacoba = New OleDb.OleDbDataAdapter("select detailtransaksi.notrans, detailtransaksi.harga, detailtransaksi.unit, 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", CONECT) cobacoba.Fill(tiwianak) tiwi.TableName = "induknya" tiwianak.TableName = "anaknya" datset.Tables.Add(tiwi) datset.Tables.Add(tiwianak) datset.Relations.Add(New DataRelation("cobaji", datset.Tables("induknya").Columns("KODEBARANG"), datset.Tables("anaknya").Columns("KODEBARANG"))) binding.DataSource = datset binding.DataMember = "induknya" binding2.DataSource = binding binding2.DataMember = "cobaji" DataGridView1.DataSource = binding DataGridView2.DataSource = binding2 End Sub End Class
Public Class LATIHAN023A36109033
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tiwi As New DataTable Dim baris As DataRow Private Sub LATIHAN023A36109033_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobacoba As New OleDb.OleDbDataAdapter cobacoba = New OleDb.OleDbDataAdapter("select * from MASTERTRANSAKSI", CONECT) cobacoba.Fill(tiwi) DataGridView1.DataSource = tiwi End Sub
Private Sub button36109033_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button36109033.Click If LATIHAN023B36109033.Visible = False Then LATIHAN023B36109033.Show() Else LATIHAN023B36109033.Activate() End If baris = tiwi.DefaultView(BindingContext(tiwi).Position).Row LATIHAN023B36109033.TextBox136109033.Text = baris("notrans") LATIHAN023B36109033.TextBox336109033.Text = baris("jenistransaksi") LATIHAN023B36109033.DateTimePicker136109033.Value = baris("tanggaltransaksi") LATIHAN023B36109033.AmbilData() End Sub End Class
Public Class LATIHAN023B36109033
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim testessaja As New DataTable Dim cobacoba As New OleDb.OleDbDataAdapter Public Sub AmbilData() cobacoba = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where NOTRANS ='" & TextBox136109033.Text & "'", CONECT) cobacoba.Fill(testessaja) End Sub Private Sub LATIHAN023B36109033_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DataGridView1.DataSource = testessaja End Sub End Class
Public Class Latihan25B36109046 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim juzttryboo As New DataTable Dim juzttryboo2 As New OleDb.OleDbDataAdapter Public Sub AmbilData() juzttryboo2 = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109046.Text & "'", conect) juzttryboo2.Fill(juzttryboo) End Sub
Private Sub latihan25B3619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DataGridView1.DataSource = juzttryboo End Sub End Class
Public Class Latihan26A36109046 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Eshafitri As New DataTable Dim baris As DataRow Dim juzttryboo As New OleDb.OleDbDataAdapter Private Sub Latihan26A36109046_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load juzttryboo = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang", conect) juzttryboo.Fill(Eshafitri) DataGridView36109046.DataSource = Eshafitri End Sub Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109046.Click If Latihan26B36109046.Visible = False Then Latihan26B36109046.Show() Else Latihan26B36109046.Activate() End If baris = Eshafitri.DefaultView(BindingContext(Eshafitri).Position).Row Latihan26B36109046.TextBox136109046.Text = baris("KODEBARANG") Latihan26B36109046.TextBox236109046.Text = baris("NAMABARANG") Latihan26B36109046.TextBox336109046.Text = baris("HARGAJUAL") Latihan26B36109046.TextBox436109046.Text = baris("PERSEDIAANAWAL") Latihan26B36109046.AmbilData() End Sub End Class
Public Class Latihan26B36109046 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim juzttryboo As New DataTable Dim juzttryboo2 As New OleDb.OleDbDataAdapter Public Sub AmbilData() juzttryboo2 = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA,(DETAILTRANSAKSI.UNIT * DETAILTRANSAKSI.HARGA)as Jumlah from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109046.Text & "'", conect) juzttryboo2.Fill(juzttryboo) Dim tu, total As Integer For Each x As DataRow In juzttryboo.Rows tu = tu + x("UNIT") total = total + x("HARGA") Next TextBox5.Text = tu TextBox6.Text = total End Sub Private Sub latihan26B3619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DataGridView1.DataSource = juzttryboo End Sub End Class
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tiwi As New DataTable Dim baris As DataRow
Private Sub Latihan024A36109033_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cobacoba As New OleDb.OleDbDataAdapter cobacoba = New OleDb.OleDbDataAdapter("select * from BARANG", CONECT) cobacoba.Fill(tiwi) DataGridView1.DataSource = tiwi End Sub
Private Sub button36109033_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button36109033.Click If LATIHAN024B36109033.Visible = False Then LATIHAN024B36109033.Show() Else LATIHAN024B36109033.Activate() End If baris = tiwi.DefaultView(BindingContext(tiwi).Position).Row LATIHAN024B36109033.TextBox136109033.Text = baris("KODEBARANG") LATIHAN024B36109033.TextBox236109033.Text = baris("NAMABARANG") LATIHAN024B36109033.TextBox336109033.Text = baris("HARGAJUAL") LATIHAN024B36109033.TextBox436109033.Text = baris("PERSEDIAANAWAL") LATIHAN024B36109033.AmbilData() End Sub End Class
Public Class LATIHAN024B36109033
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim testessaja As New DataTable Dim cobacoba As New OleDb.OleDbDataAdapter Public Sub AmbilData() cobacoba = New OleDb.OleDbDataAdapter("select * from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109033.Text & "'", CONECT) cobacoba.Fill(testessaja) End Sub
Private Sub LATIHAN024B36109033_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DataGridView1.DataSource = testessaja End Sub End Class
Public Class LATIHAN025A36109033
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tiwi As New DataTable Dim baris As DataRow Dim cobacoba As New OleDb.OleDbDataAdapter
Private Sub LATIHAN025A36109033_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load cobacoba = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang ", CONECT) cobacoba.Fill(tiwi) DataGridView1.DataSource = tiwi End Sub
Private Sub Button36109033_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button36109033.Click If LATIHAN025B36109033.Visible = False Then LATIHAN025B36109033.Show() Else LATIHAN025B36109033.Activate() End If baris = tiwi.DefaultView(BindingContext(tiwi).Position).Row LATIHAN025B36109033.TextBox136109033.Text = baris("KODEBARANG") LATIHAN025B36109033.TextBox236109033.Text = baris("NAMABARANG") LATIHAN025B36109033.TextBox336109033.Text = baris("HARGAJUAL") LATIHAN025B36109033.TextBox436109033.Text = baris("PERSEDIAANAWAL") LATIHAN025B36109033.AmbilData() End Sub End Class
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim testessaja As New DataTable Dim cobacoba As New OleDb.OleDbDataAdapter Public Sub AmbilData() cobacoba = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109033.Text & "'", CONECT) cobacoba.Fill(testessaja) End Sub
Private Sub LATIHAN025B36109033_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DataGridView1.DataSource = testessaja End Sub End Class
Public Class LATIHAN026A36109033
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tiwi As New DataTable Dim baris As DataRow Dim cobacoba As New OleDb.OleDbDataAdapter Private Sub LATIHAN026A012_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load cobacoba = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang", CONECT) cobacoba.Fill(tiwi) DataGridView1.DataSource = tiwi End Sub Private Sub button136109033_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109033.Click If LATIHAN026B36109033.Visible = False Then LATIHAN026B36109033.Show() Else LATIHAN026B36109033.Activate() End If baris = tiwi.DefaultView(BindingContext(tiwi).Position).Row LATIHAN026B36109033.TextBox136109033.Text = baris("KODEBARANG") LATIHAN026B36109033.TextBox236109033.Text = baris("NAMABARANG") LATIHAN026B36109033.TextBox336109033.Text = baris("HARGAJUAL") LATIHAN026B36109033.TextBox436109033.Text = baris("PERSEDIAANAWAL") LATIHAN026B36109033.AmbilData() End Sub End Class
Public Class LATIHAN026B36109033
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim testessaja As New DataTable Dim cobacoba As New OleDb.OleDbDataAdapter Public Sub AmbilData() cobacoba = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA,(DETAILTRANSAKSI.UNIT * DETAILTRANSAKSI.HARGA)as Jumlah from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109033.Text & "'", CONECT) cobacoba.Fill(testessaja) Dim tu, total As Integer For Each x As DataRow In testessaja.Rows tu = tu + x("UNIT") total = total + x("HARGA") Next TextBox5.Text = tu TextBox6.Text = total End Sub Private Sub LATIHAN026B012_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DataGridView1.DataSource = testessaja End Sub End Class
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Esthi As New DataTable
Dim Adapter As OleDb.OleDbDataAdapter
Private Sub LATIHAN01536109032_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Adapter = New OleDb.OleDbDataAdapter("select * from barang", CONECT) Adapter.Fill(Esthi) DataGridView136109032.DataSource = Esthi
End Sub
End Class
Public Class LATIHAN01636109032
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Esthi As New DataTable
Private Sub LATIHAN01636109032_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim Adapter As OleDb.OleDbDataAdapter Adapter = New OleDb.OleDbDataAdapter("select * from mastertransaksi", CONECT) Adapter.Fill(Esthi) DataGridView236109032.DataSource = Esthi
End Sub End Class
Public Class LATIHAN01736109032
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Esthi As New DataTable
Private Sub LATIHAN01736109032_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim Adapter As OleDb.OleDbDataAdapter Adapter = New OleDb.OleDbDataAdapter("select * from detailtransaksi", CONECT) Adapter.Fill(Esthi) DataGridView336109032.DataSource = Esthi End Sub End Class
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Esthi As New DataTable
Private Sub LATIHAN01836109032_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim Adapter As OleDb.OleDbDataAdapter Adapter = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang", CONECT) Adapter.Fill(Esthi) DataGridView436109032.DataSource = Esthi
End Sub End Class
Public Class LATIHAN01936109032
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Esthi As New DataTable
Private Sub LATIHAN01936109032_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim Adapter As OleDb.OleDbDataAdapter Adapter = 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", CONECT) Adapter.Fill(Esthi) DataGridView536109032.DataSource = Esthi
End Sub End Class
Public Class LATIHAN02036109032
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim Esthi As New DataTable
Private Sub LATIHAN02036109032_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim Adapter As OleDb.OleDbDataAdapter Adapter = 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", CONECT) Adapter.Fill(Esthi) DataGridView636109032.DataSource = Esthi
Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim mirasthi As New DataTable Dim baris As DataRow
Private Sub LATIHAN023A36109032_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim lanjutkan As New OleDb.OleDbDataAdapter lanjutkan = New OleDb.OleDbDataAdapter("select * from MASTERTRANSAKSI", connect) lanjutkan.Fill(mirasthi) DataGridView1.DataSource = mirasthi End Sub
Private Sub Button136109032_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109032.Click If LATIHAN023B36109032.Visible = False Then LATIHAN023B36109032.Show() Else LATIHAN023B36109032.Activate() End If baris = mirasthi.DefaultView(BindingContext(mirasthi).Position).Row LATIHAN023B36109032.TextBox136109032.Text = baris("notrans") LATIHAN023B36109032.TextBox236109032.Text = baris("jenistransaksi") LATIHAN023B36109032.Date136109032.Value = baris("tanggaltransaksi") LATIHAN023B36109032.AmbilData()
End Sub End Class
Public Class LATIHAN023B36109032
Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim lanjut As New DataTable Dim lanjutkan As New OleDb.OleDbDataAdapter Public Sub AmbilData() lanjutkan = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where NOTRANS ='" & TextBox136109032.Text & "'", connect) lanjutkan.Fill(lanjut) End Sub
Private Sub LATIHAN023B36109032_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DataGridView136109032.DataSource = lanjut
Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim mirasthi As New DataTable Dim baris As DataRow
Private Sub Latihan024A36109032_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim lanjutkan As New OleDb.OleDbDataAdapter lanjutkan = New OleDb.OleDbDataAdapter("select * from BARANG", connect) lanjutkan.Fill(mirasthi) DataGridView136109032.DataSource = mirasthi
End Sub
Private Sub Button136109032_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109032.Click
If LATIHAN024B36109032.Visible = False Then LATIHAN024B36109032.Show() Else LATIHAN024B36109032.Activate() End If baris = mirasthi.DefaultView(BindingContext(mirasthi).Position).Row LATIHAN024B36109032.TextBox136109032.Text = baris("KODEBARANG") LATIHAN024B36109032.TextBox236109032.Text = baris("NAMABARANG") LATIHAN024B36109032.TextBox336109032.Text = baris("HARGAJUAL") LATIHAN024B36109032.TextBox436109032.Text = baris("PERSEDIAANAWAL") LATIHAN024B36109032.AmbilData()
End Sub End Class
Public Class LATIHAN024B36109032
Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim lanjut As New DataTable Dim lanjutkan As New OleDb.OleDbDataAdapter
Public Sub AmbilData() lanjutkan = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109032.Text & "'", connect) lanjutkan.Fill(lanjut) End Sub
Private Sub LATIHAN024B36109032_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DataGridView136109032.DataSource = lanjut
Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim mirasthi As New DataTable Dim baris As DataRow Dim lanjutkan As New OleDb.OleDbDataAdapter
Private Sub LATIHAN025A36109032_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load lanjutkan = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang ", connect) lanjutkan.Fill(mirasthi) DataGridView136109032.DataSource = mirasthi
End Sub
Private Sub Button136109032_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109032.Click If LATIHAN025B36109032.Visible = False Then LATIHAN025B36109032.Show() Else LATIHAN025B36109032.Activate() End If baris = mirasthi.DefaultView(BindingContext(mirasthi).Position).Row LATIHAN025B36109032.TextBox136109032.Text = baris("KODEBARANG") LATIHAN025B36109032.TextBox236109032.Text = baris("NAMABARANG") LATIHAN025B36109032.TextBox336109032.Text = baris("HARGAJUAL") LATIHAN025B36109032.TextBox436109032.Text = baris("PERSEDIAANAWAL") LATIHAN025B36109032.AmbilData()
End Sub End Class
Public Class LATIHAN025B36109032
Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim lanjut As New DataTable Dim lanjutkan As New OleDb.OleDbDataAdapter
Public Sub AmbilData() lanjutkan = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA,(DETAILTRANSAKSI.UNIT * DETAILTRANSAKSI.HARGA)as Jumlah from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109032.Text & "'", connect) lanjutkan.Fill(lanjut) End Sub
Private Sub LATIHAN025B36109032_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DataGridView136109032.DataSource = lanjut
Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim mirasthi As New DataTable Dim baris As DataRow Dim lanjutkan As New OleDb.OleDbDataAdapter
Private Sub LATIHAN026A36109032_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load lanjutkan = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang", connect) lanjutkan.Fill(mirasthi) DataGridView136109032.DataSource = mirasthi
End Sub
Private Sub Button136109032_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109032.Click If LATIHAN026B36109032.Visible = False Then LATIHAN026B36109032.Show() Else LATIHAN026B36109032.Activate() End If baris = mirasthi.DefaultView(BindingContext(mirasthi).Position).Row LATIHAN026B36109032.TextBox136109032.Text = baris("KODEBARANG") LATIHAN026B36109032.TextBox236109032.Text = baris("NAMABARANG") LATIHAN026B36109032.TextBox336109032.Text = baris("HARGAJUAL") LATIHAN026B36109032.TextBox436109032.Text = baris("PERSEDIAANAWAL") LATIHAN026B36109032.AmbilData() End Sub End Class
Public Class LATIHAN026B36109032
Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim lanjut As New DataTable Dim lanjutkan As New OleDb.OleDbDataAdapter
Public Sub AmbilData() lanjutkan = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA,(DETAILTRANSAKSI.UNIT * DETAILTRANSAKSI.HARGA)as Jumlah from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109032.Text & "'", connect) lanjutkan.Fill(lanjut) Dim tu, total As Integer For Each x As DataRow In lanjut.Rows tu = tu + x("UNIT") total = total + x("jumlah") Next TextBox536109032.Text = tu TextBox636109032.Text = total End Sub
Private Sub LATIHAN026B36109032_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DataGridView136109032.DataSource = lanjut
Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim mirasthi As New DataTable Dim mirasthisodara As New DataTable Dim datset As New DataSet Dim bin As New BindingSource Dim bin2 As New BindingSource
Private Sub LATIHAN02136109032_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim lanjut As New OleDb.OleDbDataAdapter Dim lanjutkan As New OleDb.OleDbDataAdapter lanjut = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", connect) lanjut.Fill(mirasthi) lanjutkan = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", connect) lanjutkan.Fill(mirasthisodara) mirasthi.TableName = "bosnya" mirasthisodara.TableName = "sodaranya" datset.Tables.Add(mirasthi) datset.Tables.Add(mirasthisodara) datset.Relations.Add(New DataRelation("lanjut", datset.Tables("bosnya").Columns("NoTrans"), datset.Tables("sodaranya").Columns("NoTrans"))) bin.DataSource = datset bin.DataMember = "bosnya" bin2.DataSource = bin bin2.DataMember = "lanjut" DataGridView136109032.DataSource = bin DataGridView236109032.DataSource = bin2
Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim mirasthi As New DataTable Dim mirasthisodara As New DataTable Dim datset As New DataSet Dim bin As New BindingSource Dim bin2 As New BindingSource
Private Sub LATIHAN02236109032_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim lanjut As New OleDb.OleDbDataAdapter Dim lanjutkan As New OleDb.OleDbDataAdapter lanjut = New OleDb.OleDbDataAdapter("select * from BARANG ", connect) lanjut.Fill(mirasthi) lanjutkan = New OleDb.OleDbDataAdapter("select detailtransaksi.notrans, detailtransaksi.harga, detailtransaksi.unit, 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", connect) lanjutkan.Fill(mirasthisodara) mirasthi.TableName = "bosnya" mirasthisodara.TableName = "sodaranya" datset.Tables.Add(mirasthi) datset.Tables.Add(mirasthisodara) datset.Relations.Add(New DataRelation("lanjut", datset.Tables("bosnya").Columns("KodeBarang"), datset.Tables("sodaranya").Columns("KodeBarang"))) bin.DataSource = datset bin.DataMember = "bosnya" bin2.DataSource = bin bin2.DataMember = "lanjut" DataGridView1.DataSource = bin DataGridView2.DataSource = bin2
Public Class Lat1536109042 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim adapter As OleDb.OleDbDataAdapter Dim Muhammad As New DataTable Private Sub Lat15_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load adapter = New OleDb.OleDbDataAdapter("select * from barang", CONECT) adapter.Fill(Muhammad) DataGridView136109042.DataSource = Muhammad End Sub End Class
Public Class Lat1636109042 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim adapter As OleDb.OleDbDataAdapter Dim Muhammad As New DataTable Private Sub LATIHAN016012_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load adapter = New OleDb.OleDbDataAdapter("select * from mastertransaksi", conect) adapter.Fill(Muhammad) DataGridView136109042.DataSource = Muhammad End Sub
End Class
Public Class Lat1736109042 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim adapter As OleDb.OleDbDataAdapter Dim Muhammad As New DataTable
Private Sub LATIHAN017012_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load adapter = New OleDb.OleDbDataAdapter("select * from detailtransaksi", conect) adapter.Fill(Muhammad) DataGridView136109042.DataSource = Muhammad End Sub End Class
Public Class Lat1836109042 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim adapter As OleDb.OleDbDataAdapter Dim Muhammad As New DataTable Private Sub lat18_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load adapter = New OleDb.OleDbDataAdapter("select * from barang", conect) adapter.Fill(Muhammad) DataGridView1.DataSource = Muhammad End Sub End Class
Public Class lat1936109042 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim muhammad As New DataTable Private Sub latihan193619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim ijal As New OleDb.OleDbDataAdapter ijal = 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 ", conect) ijal.Fill(muhammad) DataGridView136109042.DataSource = muhammad End Sub End Class
Public Class Lat2036109042 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim ijal As New DataTable Private Sub latihan2036109043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim muhammad As New OleDb.OleDbDataAdapter muhammad = 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 ", conect) muhammad.Fill(ijal) DataGridView136109042.DataSource = ijal End Sub
End Class
Public Class Lat2136109042 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim ijal As New DataTable Dim anakijal As New DataTable Dim datset As New DataSet Dim bind As New BindingSource Dim bind2 As New BindingSource Private Sub latihan213619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim coba As New OleDb.OleDbDataAdapter Dim coba2 As New OleDb.OleDbDataAdapter coba = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", conect) coba.Fill(ijal) coba2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", conect) coba2.Fill(anakijal) ijal.TableName = "induknya" anakijal.TableName = "anaknya" datset.Tables.Add(ijal) datset.Tables.Add(anakijal) datset.Relations.Add(New DataRelation("coba", datset.Tables("induknya").Columns("NOTRANS"), datset.Tables("anaknya").Columns("NOTRANS"))) bind.DataSource = datset bind.DataMember = "induknya" bind2.DataSource = bind bind2.DataMember = "coba" DataGridView136109042.DataSource = bind DataGridView236109042.DataSource = bind2 End Sub
Public Class Lat2236109042 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim ijal As New DataTable Dim anakijal As New DataTable Dim datset As New DataSet Dim bind As New BindingSource Dim bind2 As New BindingSource Private Sub latihan223619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim coba As New OleDb.OleDbDataAdapter Dim coba2 As New OleDb.OleDbDataAdapter coba = New OleDb.OleDbDataAdapter("select * from BARANG ", conect) coba.Fill(ijal) coba2 = New OleDb.OleDbDataAdapter("select detailtransaksi.notrans, detailtransaksi.harga, detailtransaksi.unit, 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", conect) coba2.Fill(anakijal) ijal.TableName = "induknya" anakijal.TableName = "anaknya" datset.Tables.Add(ijal) datset.Tables.Add(anakijal) datset.Relations.Add(New DataRelation("coba", datset.Tables("induknya").Columns("KODEBARANG"), datset.Tables("anaknya").Columns("KODEBARANG"))) bind.DataSource = datset bind.DataMember = "induknya" bind2.DataSource = bind bind2.DataMember = "coba" DataGridView136109042.DataSource = bind DataGridView236109042.DataSource = bind2 End Sub End Class
Public Class Lat25A36109042 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim ijal As New DataTable Dim line As DataRow Dim coba As New OleDb.OleDbDataAdapter Private Sub latihan25A3619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load coba = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang ", conect) coba.Fill(ijal) DGV36109042.DataSource = ijal End Sub Private Sub butoon2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109042.Click If Lat25b36109042.Visible = False Then Lat25b36109042.Show() Else Lat25b36109042.Activate() End If line = ijal.DefaultView(BindingContext(ijal).Position).Row Lat25b36109042.TextBox136109042.Text = line("KODEBARANG") Lat25b36109042.TextBox236109042.Text = line("NAMABARANG") Lat25b36109042.TextBox336109042.Text = line("HARGAJUAL") Lat25b36109042.TextBox436109042.Text = line("PERSEDIAANAWAL") Lat25b36109042.AmbilData() End Sub End Class
Public Class Lat25b36109042 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim coba As New DataTable Dim cobacoba As New OleDb.OleDbDataAdapter Public Sub AmbilData() cobacoba = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA,(DETAILTRANSAKSI.UNIT * DETAILTRANSAKSI.HARGA)as Jumlah from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109042.Text & "'", conect) cobacoba.Fill(coba) End Sub
Private Sub latihan25B3619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() DataGridView136109042.DataSource = coba End Sub End Class
Public Class Lat26A36109042 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim ijal As New DataTable Dim line As DataRow Dim coba As New OleDb.OleDbDataAdapter Private Sub latihan26A3619042_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load coba = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang", conect) coba.Fill(ijal) DataGridView136109042.DataSource = ijal End Sub Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109042.Click If Lat26B36109042.Visible = False Then Lat26B36109042.Show() Else Lat26B36109042.Activate() End If line = ijal.DefaultView(BindingContext(ijal).Position).Row Lat26B36109042.TextBox136109042.Text = line("KODEBARANG") Lat26B36109042.TextBox236109042.Text = line("NAMABARANG") Lat26B36109042.TextBox336109042.Text = line("HARGAJUAL") Lat26B36109042.TextBox436109042.Text = line("PERSEDIAANAWAL") Lat26B36109042.AmbilData() End Sub End Class
Public Class latihan15035 Dim pasokan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source= C:\users\andihabibi\My Documents\latihan 15-26 mengakses data on 10.0.7.1\DataTransaksiJualBeli.accdb") Dim Bakpenampung As New DataTable
Private Sub Latihan015035_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim X As New OleDb.OleDbDataAdapter X = New OleDb.OleDbDataAdapter("select* from BARANG", pasokan) X.Fill(Bakpenampung) X.Dispose()
DataGridView1035.DataSource = Bakpenampung
End Sub End Class
Public Class latihan16035 Dim pasokan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source= C:\users\andihabibi\My Documents\latihan 15-26 mengakses data on 10.0.7.1\DataTransaksiJualBeli.accdb") Dim Bakpenampung As New DataTable
Private Sub Latihan16035_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim X As New OleDb.OleDbDataAdapter X = New OleDb.OleDbDataAdapter("select* from MASTERTRANSAKSI", pasokan) X.Fill(Bakpenampung) X.Dispose()
DataGridView1035.DataSource = Bakpenampung End Sub
End Class
Public Class latihan17035 Dim pasokan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source= C:\users\andihabibi\My Documents\latihan 15-26 mengakses data on 10.0.7.1\DataTransaksiJualBeli.accdb") Dim Bakpenampung As New DataTable
Private Sub Latihan17035_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim X As New OleDb.OleDbDataAdapter X = New OleDb.OleDbDataAdapter("select* from DETAILTRANSAKSI", pasokan) X.Fill(Bakpenampung) X.Dispose()
DataGridView1035.DataSource = Bakpenampung End Sub End Class
Public Class latihan18035 Dim pasokan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source= C:\users\andihabibi\My Documents\latihan 15-26 mengakses data on 10.0.7.1\DataTransaksiJualBeli.accdb") Dim Bakpenampung As New DataTable
Private Sub Latihan18035_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim X As New OleDb.OleDbDataAdapter X = New OleDb.OleDbDataAdapter("select BARANG.KODEBARANG, BARANG.NAMABARANG, DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from BARANG inner join DETAILTRANSAKSI on BARANG.KODEBARANG=DETAILTRANSAKSI.KODEBARANG", pasokan) X.Fill(Bakpenampung) X.Dispose()
DataGridView1035.DataSource = Bakpenampung End Sub End Class
Dim connect As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim falah As New DataTable
Private Sub Latihan_15361090552_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select * from barang", connect) adapter.Fill(falah) dgv36109055.DataSource = falah End Sub End Class
Public Class Latihan_1636109055
Dim connect As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim falah As New DataTable
Private Sub Latihan_16361090552_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select * from mastertransaksi", connect) adapter.Fill(falah) dgv36109055.DataSource = falah End Sub End Class
Public Class Latihan_1736109055 Dim connect As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim falah As New DataTable Private Sub Latihan_1736109055_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select * from detailtransaksi", connect) adapter.Fill(falah) dgv36109055.DataSource = falah End Sub End Class
Public Class Latihan_1836109055 Dim connect As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim falah As New DataTable Private Sub Latihan_1836109055_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang", connect) adapter.Fill(falah) dgv36109055.DataSource = falah End Sub End Class
Public Class LATIHAN1836109030 Dim conect As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim sanie As New DataTable Private Sub LATIHAN1836109030_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang", conect) adapter.Fill(sanie) dgv36109030.DataSource = sanie End Sub End Class
Public Class LATIHAN1936109030 Dim conect As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim sanie As New DataTable Private Sub LATIHAN1936109030_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = 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", conect) adapter.Fill(sanie) dgv36109030.DataSource = sanie End Sub End Class
Public Class LATIHAN2036109030 Dim conect As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim sanie As New DataTable Private Sub LATIHAN2036109030_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As OleDb.OleDbDataAdapter adapter = 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", conect) adapter.Fill(sanie) dgv36109030.DataSource = sanie End Sub End Class
Public Class LATIHAN2236109030 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim sanie As New DataTable Dim sanieanak As New DataTable Dim datset As New DataSet Dim bin As New BindingSource Dim bin2 As New BindingSource Private Sub LATIHAN2236109030_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim tes As New OleDb.OleDbDataAdapter Dim tes2 As New OleDb.OleDbDataAdapter tes = New OleDb.OleDbDataAdapter("select * from BARANG ", conect) tes.Fill(sanie) tes2 = New OleDb.OleDbDataAdapter("select detailtransaksi.notrans, detailtransaksi.harga, detailtransaksi.unit, 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", conect) tes2.Fill(sanieanak) sanie.TableName = "induknya" sanieanak.TableName = "anaknya" datset.Tables.Add(sanie) datset.Tables.Add(sanieanak) datset.Relations.Add(New DataRelation("tes", datset.Tables("induknya").Columns("KODEBARANG"), datset.Tables("anaknya").Columns("KODEBARANG"))) bin.DataSource = datset bin.DataMember = "induknya" bin2.DataSource = bin bin2.DataMember = "tes" dgv136109030.DataSource = bin dgv236109030.DataSource = bin2 End Sub End Class
Public Class latihan1536109039 Dim pasokan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source= C:\users\musdalifah\My Documents\latihan 15-26 mengakses data on 10.0.7.1\DataTransaksiJualBeli.accdb") Dim Ifha As New DataTable Private Sub latihan1536109039_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim X As New OleDb.OleDbDataAdapter X = New OleDb.OleDbDataAdapter("select* from BARANG", pasokan) X.Fill(Ifha) X.Dispose()
DataGridView136109039.DataSource = Ifha
End Sub End Class
Public Class latihan1636109039 Dim pasokan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source= C:\users\musdalifah\My Documents\latihan 15-26 mengakses data on 10.0.7.1\DataTransaksiJualBeli.accdb") Dim Ifha As New DataTable
Private Sub Latihan1636109039_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim X As New OleDb.OleDbDataAdapter X = New OleDb.OleDbDataAdapter("select* from MASTERTRANSAKSI", pasokan) X.Fill(Ifha) X.Dispose()
DataGridView136109039.DataSource = Ifha End Sub End Class
Public Class latihan1736109039 Dim pasokan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source= C:\users\musdalifah\My Documents\latihan 15-26 mengakses data on 10.0.7.1\DataTransaksiJualBeli.accdb") Dim Bakpenampung As New DataTable
Private Sub Latihan1736109039_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim X As New OleDb.OleDbDataAdapter X = New OleDb.OleDbDataAdapter("select* from DETAILTRANSAKSI", pasokan) X.Fill(Ifha) X.Dispose()
DataGridView136109039.DataSource = Ifha End Sub End Class
Komentar ini telah dihapus oleh pengarang.
BalasHapusassalamu a'laikum
BalasHapusPublic Class Form2036108001
BalasHapusDim Ince As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source= " & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim Aulia As New DataTable
Private Sub Form2036108001_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Akhriani As New OleDb.OleDbDataAdapter
Akhriani = 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", Ince)
Akhriani.Fill(Aulia)
DGV36108001.DataSource = Aulia
End Sub
End Class
Public Class Form2136108001
Dim Ince As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source= " & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim Aulia As New DataTable
Dim Dulina As New DataTable
Dim Arhy As New DataSet
Dim Egiet As New BindingSource
Dim Ayi As New BindingSource
Private Sub Form2136108001_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Akhriani As New OleDb.OleDbDataAdapter
Dim Anhye As New OleDb.OleDbDataAdapter
Akhriani = New OleDb.OleDbDataAdapter("select * from mastertransaksi", Ince)
Akhriani.Fill(Aulia)
Anhye = New OleDb.OleDbDataAdapter("select * from detailtransaksi", Ince)
Anhye.Fill(Dulina)
Aulia.TableName = "induknya"
Dulina.TableName = "anaknya"
Arhy.Tables.Add(Aulia)
Arhy.Tables.Add(Dulina)
Arhy.Relations.Add(New DataRelation("Akhriani", Arhy.Tables("induknya").Columns("notrans"), Arhy.Tables("anaknya").Columns("notrans")))
Egiet.DataSource = Arhy
Egiet.DataMember = "induknya"
Ayi.DataSource = Egiet
Ayi.DataMember = "Akhriani"
DGV136108001.DataSource = Egiet
DGV236108001.DataSource = Ayi
End Sub
End Class
Public Class Form2236108001
Dim Ince As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source= " & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim Aulia As New DataTable
Dim Dulina As New DataTable
Dim Arhy As New DataSet
Dim Egiet As New BindingSource
Dim Ayi As New BindingSource
Private Sub Form2236108001_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Akhriani As New OleDb.OleDbDataAdapter
Dim Anhye As New OleDb.OleDbDataAdapter
Akhriani = New OleDb.OleDbDataAdapter("select * from barang", Ince)
Akhriani.Fill(Aulia)
Anhye = New OleDb.OleDbDataAdapter("select * from detailtransaksi", Ince)
Anhye.Fill(Dulina)
Aulia.TableName = "induknya"
Dulina.TableName = "anaknya"
Arhy.Tables.Add(Aulia)
Arhy.Tables.Add(Dulina)
Arhy.Relations.Add(New DataRelation("Akhriani", Arhy.Tables("induknya").Columns("kodebarang"), Arhy.Tables("anaknya").Columns("kodebarang")))
Egiet.DataSource = Arhy
Egiet.DataMember = "induknya"
Ayi.DataSource = Egiet
Ayi.DataMember = "Akhriani"
DGV136108001.DataSource = Egiet
DGV236108001.DataSource = Ayi
End Sub
End Class
knp nda muncul smua yg z komentarkan pak??
BalasHapusdah 2 kali z masukkan smua..
hehe
klwpun nnti mncul smua,mf double..
tp klw msl.y nd mncul,wadduuhhh..
knapa tdk mau di komen ini blogku khaeril jhi.blogspot.com
BalasHapusPublic Class Form1536109050
BalasHapusDim conect As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim uni As New DataTable
Private Sub Form1536109050_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select*from barang", conect)
adapter.Fill(uni)
DataGridView1.DataSource = uni
End Sub
End Class
Public Class Form1636109050
Dim conect As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim uni As New DataTable
Private Sub Form1636109050_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select*from mastertransaksi", conect)
adapter.Fill(uni)
DataGridView1.DataSource = uni
End Sub
End Class
Public Class Form1736109050
Dim conect As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim uni As New DataTable
Private Sub Form1736109050_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select*from detailtransaksi", conect)
adapter.Fill(uni)
DataGridView1.DataSource = uni
End Sub
End Class
Public Class Form1836109050
Dim conect As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim uni As New DataTable
Private Sub Form1836109050_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang", conect)
adapter.Fill(uni)
DataGridView1.DataSource = uni
End Sub
End Class
maaf pa tdk mau terkirim scrip ku ini blokku khaeriljhi.blogspot.com
BalasHapusPublic Class LATIHAN01536109038
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Icha As New DataTable
Private Sub LATIHAN01536109038_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("Select*from barang", CONECT)
adapter.Fill(Icha)
DataGridView136109038.DataSource = Icha
End Sub
End Class
Public Class LATIHAN01636109038
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Icha As New DataTable
Private Sub LATIHAN01636109038_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("Select*from mastertransaksi", CONECT)
adapter.Fill(Icha)
DataGridView136109038.DataSource = Icha
End Sub
End Class
Public Class LATIHAN01736109038
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Icha As New DataTable
Private Sub LATIHAN01736109038_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("Select*from detailtransaksi", CONECT)
adapter.Fill(Icha)
DataGridView136109038.DataSource = Icha
End Sub
End Class
Public Class LATIHAN01736109038
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Icha As New DataTable
Private Sub LATIHAN01736109038_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("Select*from detailtransaksi", CONECT)
adapter.Fill(Icha)
DataGridView136109038.DataSource = Icha
End Sub
End Class
Public Class LATIHAN01836109038
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Icha As New DataTable
Private Sub LATIHAN01836109038_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang", CONECT)
adapter.Fill(Icha)
DataGridView136109038.DataSource = Icha
End Sub
End Class
Latihan_15_36109056
BalasHapusPublic Class latihan_15_36109056
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim biya As New DataTable
Private Sub latihan_15_36109056_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select*from BARANG", CONECT)
adapter.Fill(biya)
DataGridView1.DataSource = biya
End Sub
End Class
Latihan_16_36109056
Public Class latihan_16_36109056
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim biya As New DataTable
Private Sub latihan_16_36109056_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", CONECT)
adapter.Fill(biya)
DataGridView1.DataSource = biya
End Sub
End Class
Latihan_17_36109056
Public Class latihan_17_36109056
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim biya As New DataTable
Private Sub latihan_17_36109056_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", CONECT)
adapter.Fill(biya)
DataGridView1.DataSource = biya
End Sub
End Class
Public Class Latihan1536109044
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Firah As New DataTable
Private Sub LATIHAN1536109044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Adapter As OleDb.OleDbDataAdapter
Adapter = New OleDb.OleDbDataAdapter("select * from barang", CONECT)
Adapter.Fill(Firah)
DataGridView136109044.DataSource = Firah
End Sub
Private Sub DataGridView136109044_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView136109044.CellContentClick
End Sub
End Class
Public Class Latihan1636109044
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Firah As New DataTable
Private Sub Latihan1636109044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Adapter As OleDb.OleDbDataAdapter
Adapter = New OleDb.OleDbDataAdapter("select * from mastertransaksi", CONECT)
Adapter.Fill(Firah)
DataGridView136109044.DataSource = Firah
End Sub
Private Sub DataGridView136109044_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView136109044.CellContentClick
End Sub
End Class
Public Class Latihan1736109044
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Firah As New DataTable
Private Sub Latihan1736109044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Adapter As OleDb.OleDbDataAdapter
Adapter = New OleDb.OleDbDataAdapter("select * from detailtransaksi", CONECT)
Adapter.Fill(Firah)
DataGridView136109044.DataSource = Firah
End Sub
Private Sub DataGridView136109044_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView136109044.CellContentClick
End Sub
End Class
Public Class Latihan1836109044
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Firah As New DataTable
Private Sub Latihan1836109044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Adapter As OleDb.OleDbDataAdapter
Adapter = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang", CONECT)
Adapter.Fill(Firah)
DataGridView136109044.DataSource = Firah
End Sub
Private Sub DataGridView136109044_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView136109044.CellContentClick
End Sub
End Class
Public Class Latihan1936109044
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Firah As New DataTable
Private Sub Latihan1936109044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Adapter As OleDb.OleDbDataAdapter
Adapter = 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", CONECT)
Adapter.Fill(Firah)
DataGridView136109044.DataSource = Firah
End Sub
End Class
Public Class Latihan2036109044
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Firah As New DataTable
Private Sub Latihan2036109044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Adapter As OleDb.OleDbDataAdapter
Adapter = 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", CONECT)
Adapter.Fill(Firah)
DataGridView136109044.DataSource = Firah
End Sub
End Class
Public Class Latihan2136109044
BalasHapusDim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim firah As New DataTable
Dim magfirah As New DataTable
Dim datset As New DataSet
Dim bin As New BindingSource
Dim bin2 As New BindingSource
Private Sub latihan2136109044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
Dim cobaji2 As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", conect)
cobaji.Fill(firah)
cobaji2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", conect)
cobaji2.Fill(magfirah)
firah.TableName = "induknya"
magfirah.TableName = ("anaknya")
datset.Tables.Add(firah)
datset.Tables.Add(magfirah)
datset.Relations.Add(New DataRelation("cobaji", datset.Tables("induknya").Columns("NOTRANS"), datset.Tables("anaknya").Columns("NOTRANS")))
bin.DataSource = datset
bin.DataMember = "induknya"
bin2.DataSource = bin
bin2.DataMember = "cobaji"
DataGridView136109044.DataSource = bin
DataGridView236109044.DataSource = bin2
End Sub
End Class
Public Class Latihan2236109044
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim firah As New DataTable
Dim magfirah As New DataTable
Dim datset As New DataSet
Dim bin As New BindingSource
Dim bin2 As New BindingSource
Private Sub latihan2236109044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
Dim cobaji2 As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select * from BARANG ", konek)
cobaji.Fill(firah)
cobaji2 = New OleDb.OleDbDataAdapter("select detailtransaksi.notrans, detailtransaksi.harga, detailtransaksi.unit, 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", konek)
cobaji2.Fill(magfirah)
firah.TableName = "induknya"
magfirah.TableName = "anaknya"
datset.Tables.Add(firah)
datset.Tables.Add(magfirah)
datset.Relations.Add(New DataRelation("cobaji", datset.Tables("induknya").Columns("KODEBARANG"), datset.Tables("anaknya").Columns("KODEBARANG")))
bin.DataSource = datset
bin.DataMember = "induknya"
bin2.DataSource = bin
bin2.DataMember = "cobaji"
DataGridView136109044.DataSource = bin
DataGridView236109044.DataSource = bin2
End Sub
End Class
Public Class Latihan23A36109044
BalasHapusDim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim firah As New DataTable
Dim baris As DataRow
Private Sub latihan23A36109044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select * from MASTERTRANSAKSI", konek)
cobaji.Fill(firah)
DataGridView136109044.DataSource = firah
End Sub
Private Sub BUTTON1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KLIK36109044.Click
If Latihan23B36109044.Visible = False Then
Latihan23B36109044.Show()
Else
Latihan23B36109044.Activate()
End If
baris = firah.DefaultView(BindingContext(firah).Position).Row
Latihan23B36109044.TextBox136109044.Text = baris("notrans")
Latihan23B36109044.TextBox236109044.Text = baris("jenistransaksi")
Latihan23B36109044.DateTimePicker1.Value = baris("tanggaltransaksi")
Latihan23B36109044.AmbilData()
End Sub
Private Sub KLIK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KLIK36109044.Click
End Sub
End Class
Public Class Latihan23B36109044
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tesji As New DataTable
Dim cobaji As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
cobaji = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where NOTRANS ='" & TextBox136109044.Text & "'", konek)
cobaji.Fill(tesji)
End Sub
Private Sub Latihan23B3619044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DataGridView1.DataSource = tesji
End Sub
End Class
Public Class Latihan24A36109044
BalasHapusDim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim firah As New DataTable
Dim baris As DataRow
Private Sub Latihan24B36109044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select * from BARANG", konek)
cobaji.Fill(firah)
DataGridView136109044.DataSource = firah
End Sub
Private Sub butoon2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butoon236109044.Click
If Latihan24B36109044.Visible = False Then
Latihan24B36109044.Show()
Else
Latihan24B36109044.Activate()
End If
baris = firah.DefaultView(BindingContext(firah).Position).Row
Latihan24B36109044.TextBox136109044.Text = baris("KODEBARANG")
Latihan24B36109044.TextBox236109044.Text = baris("NAMABARANG")
Latihan24B36109044.TextBox336109044.Text = baris("HARGAJUAL")
Latihan24B36109044.TextBox436109044.Text = baris("PERSEDIAANAWAL")
Latihan24B36109044.AmbilData()
End Sub
End Class
Public Class Latihan24B36109044
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tesji As New DataTable
Dim cobaji As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
cobaji = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109044.Text & "'", konek)
cobaji.Fill(tesji)
End Sub
Private Sub latihan24B36109044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DataGridView136109044.DataSource = tesji
End Sub
End Class
Public Class Latihan25A36109044
BalasHapusDim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim firah As New DataTable
Dim baris As DataRow
Dim cobaji As New OleDb.OleDbDataAdapter
Private Sub Latihan25A36109044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
cobaji = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang ", konek)
cobaji.Fill(firah)
DataGridView136109044.DataSource = firah
End Sub
Private Sub butoon2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109044.Click
If Latihan25B36109044.Visible = False Then
Latihan25B36109044.Show()
Else
Latihan25B36109044.Activate()
End If
baris = firah.DefaultView(BindingContext(firah).Position).Row
Latihan25B36109044.TextBox136109044.Text = baris("KODEBARANG")
Latihan25B36109044.TextBox236109044.Text = baris("NAMABARANG")
Latihan25B36109044.TextBox336109044.Text = baris("HARGAJUAL")
Latihan25B36109044.TextBox436109044.Text = baris("PERSEDIAANAWAL")
Latihan25B36109044.AmbilData()
End Sub
End Class
Public Class Latihan25B36109044
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tesji As New DataTable
Dim cobaji As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
cobaji = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109044.Text & "'", konek)
cobaji.Fill(tesji)
End Sub
Private Sub Latihan25B36109044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DataGridView136109044.DataSource = tesji
End Sub
End Class
Latihan_18_36109056
BalasHapusPublic Class latihan_18_36109056
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim biya As New DataTable
Private Sub latihan_18_36109056_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang", CONECT)
adapter.Fill(biya)
DataGridView1.DataSource = biya
End Sub
End Class
Latihan_19_36109056
Public Class latihan_19_36109056
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim biya As New DataTable
Private Sub latihan_19_36109056_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = 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", CONECT)
adapter.Fill(biya)
DataGridView36109056.DataSource = biya
End Sub
End Class
Latihan_20_36109056
Public Class latihan_20_36109056
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim biya As New DataTable
Private Sub latihan_20_36109056_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = 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", CONECT)
adapter.Fill(biya)
DataGridView36109056.DataSource = biya
End Sub
End Class
Komentar ini telah dihapus oleh pengarang.
BalasHapusLatihan_21_36109056
BalasHapusPublic Class latihan_21_36109056
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim biya As New DataTable
Dim biyaanak As New DataTable
Dim datset As New DataSet
Dim bin As New BindingSource
Dim bin2 As New BindingSource
Private Sub latihan_2136109056_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
Dim cobaji2 As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", konek)
cobaji.Fill(biya)
cobaji2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", konek)
cobaji2.Fill(biyaanak)
biya.TableName = "induknya"
biyaanak.TableName = "anaknya"
datset.Tables.Add(biya)
datset.Tables.Add(biyaanak)
datset.Relations.Add(New DataRelation("cobaji", datset.Tables("induknya").Columns("NOTRANS"), datset.Tables("anaknya").Columns("NOTRANS")))
bin.DataSource = datset
bin.DataMember = "induknya"
bin2.DataSource = bin
bin2.DataMember = "cobaji"
dgv1_36109056.DataSource = bin
dgv2_36109056.DataSource = bin2
End Sub
End Class
Latihan_22_36109056
Public Class latihan_22_36109056
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim biya As New DataTable
Dim biyaanak As New DataTable
Dim datset As New DataSet
Dim bin As New BindingSource
Dim bin2 As New BindingSource
Private Sub latihan_22_36109056_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim coba As New OleDb.OleDbDataAdapter
Dim coba2 As New OleDb.OleDbDataAdapter
coba = New OleDb.OleDbDataAdapter("select * from BARANG ", konek)
coba.Fill(biya)
coba2 = New OleDb.OleDbDataAdapter("select detailtransaksi.notrans, detailtransaksi.harga, detailtransaksi.unit, 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", konek)
coba2.Fill(biyaanak)
biya.TableName = "induknya"
biyaanak.TableName = "anaknya"
datset.Tables.Add(biya)
datset.Tables.Add(biyaanak)
datset.Relations.Add(New DataRelation("coba", datset.Tables("induknya").Columns("KODEBARANG"), datset.Tables("anaknya").Columns("KODEBARANG")))
bin.DataSource = datset
bin.DataMember = "induknya"
bin2.DataSource = bin
bin2.DataMember = "coba"
dgv1_36109056.DataSource = bin
dgv2_36109056.DataSource = bin2
End Sub
End Class
Latihan_23a_36109056
BalasHapusPublic Class latihan_23a_36109056
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim biya As New DataTable
Dim baris As DataRow
Private Sub latihan_23a_026_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select * from MASTERTRANSAKSI", konek)
cobaji.Fill(biya)
dgv36109056.DataSource = biya
End Sub
Private Sub Button36109056_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button36109056.Click
If latihan_23b_36109056.Visible = False Then
latihan_23b_36109056.Show()
Else
latihan_23b_36109056.Activate()
End If
baris = biya.DefaultView(BindingContext(biya).Position).Row
latihan_23b_36109056.TextBox136109056.Text = baris("notrans")
latihan_23b_36109056.TextBox236109056.Text = baris("jenistransaksi")
latihan_23b_36109056.dtp36109056.Value = baris("tanggaltransaksi")
latihan_23b_36109056.AmbilData()
End Sub
End Class
Latihan_23b_36109056
Public Class latihan_23b_36109056
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tesji As New DataTable
Dim cobaji As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
cobaji = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where NOTRANS ='" & TextBox136109056.Text & "'", konek)
cobaji.Fill(tesji)
End Sub
Private Sub latihan_23b_36109056_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
dgv36109056.DataSource = tesji
End Sub
End Class
Latihan_24a_36109056
BalasHapusPublic Class latihan_24a_36109056
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim biya As New DataTable
Dim baris As DataRow
Private Sub latihan_24a_026_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select * from BARANG", konek)
cobaji.Fill(biya)
dgv36109056.DataSource = biya
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109056.Click
If latihan_24b_36109056.Visible = False Then
latihan_24b_36109056.Show()
Else
latihan_24b_36109056.Activate()
End If
baris = biya.DefaultView(BindingContext(biya).Position).Row
latihan_24b_36109056.TextBox1_36109056.Text = baris("KODEBARANG")
latihan_24b_36109056.TextBox2_36109056.Text = baris("NAMABARANG")
latihan_24b_36109056.TextBox3_36109056.Text = baris("HARGAJUAL")
latihan_24b_36109056.TextBox4_36109056.Text = baris("PERSEDIAANAWAL")
latihan_24b_36109056.AmbilData()
End Sub
End Class
Latihan_24b_36109056
Public Class latihan_24b_36109056
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tesji As New DataTable
Dim cobaji As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
cobaji = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox1_36109056.Text & "'", konek)
cobaji.Fill(tesji)
End Sub
Private Sub latihan_24b_36109056_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
dgv1_36109056.DataSource = tesji
End Sub
End Class
Latihan_25a_36109056
BalasHapusPublic Class latihan_25a_36109056
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim biya As New DataTable
Dim baris As DataRow
Dim coba As New OleDb.OleDbDataAdapter
Private Sub latihan_25a_36109056_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
coba = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang ", konek)
coba.Fill(biya)
dgv36109056.DataSource = biya
End Sub
Private Sub Button1_36109056_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1_36109056.Click
If latihan_25b_36109056.Visible = False Then
latihan_25b_36109056.Show()
Else
latihan_25b_36109056.Activate()
End If
baris = biya.DefaultView(BindingContext(biya).Position).Row
latihan_25b_36109056.TextBox1_36109056.Text = baris("KODEBARANG")
latihan_25b_36109056.TextBox2_36109056.Text = baris("NAMABARANG")
latihan_25b_36109056.TextBox3_36109056.Text = baris("HARGAJUAL")
latihan_25b_36109056.TextBox4_36109056.Text = baris("PERSEDIAANAWAL")
latihan_25b_36109056.AmbilData()
End Sub
End Class
Latihan_25b_36109056
Public Class latihan_25b_36109056
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tes As New DataTable
Dim coba As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
coba = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA,(DETAILTRANSAKSI.UNIT * DETAILTRANSAKSI.HARGA)as Jumlah from DETAILTRANSAKSI where KODEBARANG ='" & TextBox1_36109056.Text & "'", konek)
coba.Fill(tes)
End Sub
Private Sub latihan_25b_36109056_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
dgv1_36109056.DataSource = tes
End Sub
End Class
Latihan_26a_36109056
BalasHapusPublic Class latihan_26a_36109056
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim biya As New DataTable
Dim baris As DataRow
Dim coba As New OleDb.OleDbDataAdapter
Private Sub latihan_26a_36109056_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
coba = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang", konek)
coba.Fill(biya)
dgv1_36109056.DataSource = biya
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1_36109056.Click
If latihan_26b_36109056.Visible = False Then
latihan_26b_36109056.Show()
Else
latihan_26b_36109056.Activate()
End If
baris = biya.DefaultView(BindingContext(biya).Position).Row
latihan_26b_36109056.TextBox1_36109056.Text = baris("KODEBARANG")
latihan_26b_36109056.TextBox2_36109056.Text = baris("NAMABARANG")
latihan_26b_36109056.TextBox3_36109056.Text = baris("HARGAJUAL")
latihan_26b_36109056.TextBox4_36109056.Text = baris("PERSEDIAANAWAL")
latihan_26b_36109056.AmbilData()
End Sub
End Class
Latihan_26b_36109056
Public Class latihan_26b_36109056
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tes As New DataTable
Dim coba As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
coba = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox1_36109056.Text & "'", konek)
coba.Fill(tes)
Dim tu, total As Integer
For Each x As DataRow In tes.Rows
tu = tu + x("UNIT")
total = total + x("HARGA")
Next
TextBox5_36109056.Text = tu
TextBox6_36109056.Text = total
End Sub
Private Sub latihan_26b_36109056_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
dgv1_36109056.DataSource = tes
End Sub
End Class
Public Class Latihan1536109034
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim NUNU As New DataTable
Dim adapter As OleDb.OleDbDataAdapter
Private Sub Latihan1536109034_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
adapter = New OleDb.OleDbDataAdapter("select * FROM BARANG", CONECT)
adapter.Fill(NUNU)
DataGridView1.DataSource = NUNU
End Sub
End Class
Public Class Latihan1636109034
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim NUNU As New DataTable
Dim adapter As OleDb.OleDbDataAdapter
Private Sub Latihan1636109034_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
adapter = New OleDb.OleDbDataAdapter("select * FROM MASTERTRANSAKSI", CONECT)
adapter.Fill(NUNU)
DataGridView1.DataSource = NUNU
End Sub
End Class
Public Class Latihan1736109034
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim NUNU As New DataTable
Dim adapter As OleDb.OleDbDataAdapter
Private Sub Latihan1736109034_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
adapter = New OleDb.OleDbDataAdapter("select * FROM DETAILTRANSAKSI", CONECT)
adapter.Fill(NUNU)
DataGridView1.DataSource = NUNU
End Sub
End Class
Public Class Latihan1836109034
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim NUNU As New DataTable
Dim adapter As OleDb.OleDbDataAdapter
Private Sub Latihan1836109034_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
adapter = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang", CONECT)
adapter.Fill(NUNU)
DataGridView1.DataSource = NUNU
End Sub
End Class
Public Class Latihan1936109034
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim NUNU As New DataTable
Dim adapter As OleDb.OleDbDataAdapter
Private Sub Latihan1936109034_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
adapter = 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", CONECT)
adapter.Fill(NUNU)
DataGridView1.DataSource = NUNU
End Sub
End Class
Public Class Latihan2036109034
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim NUNU As New DataTable
Dim adapter As OleDb.OleDbDataAdapter
Private Sub Latihan2036109034_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
adapter = 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", CONECT)
adapter.Fill(NUNU)
DataGridView1.DataSource = NUNU
End Sub
End Class
Public Class Latihan2136109034
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim NUR As New DataTable
Dim HIDAYAH As New DataTable
Dim DATASET As New DataSet
Dim BS1 As New BindingSource
Dim BS2 As New BindingSource
Private Sub Latihan2136109034_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim TRY1 As New OleDb.OleDbDataAdapter
Dim TRY2 As New OleDb.OleDbDataAdapter
TRY1 = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", CONECT)
TRY1.Fill(NUR)
TRY2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", CONECT)
TRY2.Fill(HIDAYAH)
NUR.TableName = "induknya"
HIDAYAH.TableName = "anaknya"
DATASET.Tables.Add(NUR)
DATASET.Tables.Add(HIDAYAH)
DATASET.Relations.Add(New DataRelation("TRY1", DATASET.Tables("induknya").Columns("NOTRANS"), DATASET.Tables("anaknya").Columns("NOTRANS")))
BS1.DataSource = DATASET
BS1.DataMember = "induknya"
BS2.DataSource = BS1
BS2.DataMember = "TRY1"
DGV136109034.DataSource = BS1
DGV236109034.DataSource = BS2
End Sub
End Class
Public Class Latihan2236109034
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim NUR As New DataTable
Dim HIDAYAH As New DataTable
Dim DATASET As New DataSet
Dim BS1 As New BindingSource
Dim BS2 As New BindingSource
Private Sub Latihan2236109034_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim TRY1 As New OleDb.OleDbDataAdapter
Dim TRY2 As New OleDb.OleDbDataAdapter
TRY1 = New OleDb.OleDbDataAdapter("select * from BARANG ", CONECT)
TRY1.Fill(NUR)
TRY2 = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.HARGA, DETAILTRANSAKSI.UNIT, 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", CONECT)
TRY2.Fill(HIDAYAH)
NUR.TableName = "induknya"
HIDAYAH.TableName = "anaknya"
DATASET.Tables.Add(NUR)
DATASET.Tables.Add(HIDAYAH)
DATASET.Relations.Add(New DataRelation("TRY1", DATASET.Tables("induknya").Columns("KODEBARANG"), DATASET.Tables("anaknya").Columns("KODEBARANG")))
BS1.DataSource = DATASET
BS1.DataMember = "induknya"
BS2.DataSource = BS1
BS2.DataMember = "TRY1"
DGV136109034.DataSource = BS1
DGV236109034.DataSource = BS2
End Sub
End Class
Public Class Latihan23A36109034
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim NURHIDAYAH As New DataTable
Dim BARIS As DataRow
Private Sub Latihan23A36109034_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim BEDE As New OleDb.OleDbDataAdapter
BEDE = New OleDb.OleDbDataAdapter("select * from MASTERTRANSAKSI", CONECT)
BEDE.Fill(NURHIDAYAH)
DGV136109034.DataSource = NURHIDAYAH
End Sub
Private Sub KLIKK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KLIKK.Click
If Latihan23B36109034.Visible = False Then
Latihan23B36109034.Show()
Else
Latihan23B36109034.Activate()
End If
BARIS = NURHIDAYAH.DefaultView(BindingContext(NURHIDAYAH).Position).Row
Latihan23B36109034.TextBox1_36109034.Text = BARIS("notrans")
Latihan23B36109034.TextBox3_36109034.Text = BARIS("jenistransaksi")
Latihan23B36109034.DTP1_36109034.Value = BARIS("tanggaltransaksi")
Latihan23B36109034.AmbilData()
End Sub
End Class
Public Class Latihan23B36109034
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim TRY1 As New DataTable
Dim TRY2 As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
TRY2 = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where NOTRANS ='" & TextBox1_36109034.Text & "'", CONECT)
TRY2.Fill(TRY1)
End Sub
Private Sub Latihan23B3619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DGV1_36109034.DataSource = TRY1
End Sub
End Class
Public Class Latihan24A36109034
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim NURHIDAYAH As New DataTable
Dim BARIS As DataRow
Dim BEDE As New OleDb.OleDbDataAdapter
Private Sub Latihan24A36109034_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
BEDE = New OleDb.OleDbDataAdapter("select * from BARANG", CONECT)
BEDE.Fill(NURHIDAYAH)
DGV136109034.DataSource = NURHIDAYAH
End Sub
Private Sub KLIK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KLIK.Click
If Latihan24B36109034.Visible = False Then
Latihan24B36109034.Show()
Else
Latihan24B36109034.Activate()
End If
BARIS = NURHIDAYAH.DefaultView(BindingContext(NURHIDAYAH).Position).Row
Latihan24B36109034.TextBox1_36109034.Text = BARIS("KODEBARANG")
Latihan24B36109034.TextBox2_36109034.Text = BARIS("NAMABARANG")
Latihan24B36109034.TextBox3_36109034.Text = BARIS("HARGAJUAL")
Latihan24B36109034.TextBox4_36109034.Text = BARIS("PERSEDIAANAWAL")
Latihan24B36109034.AmbilData()
End Sub
End Class
Public Class Latihan24B36109034
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim TRY1 As New DataTable
Dim TRY2 As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
TRY2 = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox1_36109034.Text & "'", CONECT)
TRY2.Fill(TRY1)
End Sub
Private Sub latihan24B36109034_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DGV136109034.DataSource = TRY1
End Sub
End Class
Public Class Latihan25A36109034
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim NURHIDAYAH As New DataTable
Dim BARIS As DataRow
Dim BEDE As New OleDb.OleDbDataAdapter
Private Sub Latihan25A36109034_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
BEDE = New OleDb.OleDbDataAdapter("select MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA,(DETAILTRANSAKSI.UNIT*DETAILTRANSAKSI.HARGA)AS JUMLAH, BARANG.KODEBARANG, BARANG.NAMABARANG,BARANG.HARGAJUAL,BARANG.PERSEDIAANAWAL FROM (MASTERTRANSAKSI INNER JOIN DETAILTRANSAKSI ON MASTERTRANSAKSI.NOTRANS=DETAILTRANSAKSI.NOTRANS) INNER JOIN BARANG ON DETAILTRANSAKSI.KODEBARANG=BARANG.KODEBARANG ", CONECT)
BEDE.Fill(NURHIDAYAH)
DGV136109034.DataSource = NURHIDAYAH
End Sub
Private Sub KLIK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KLIK.Click
If Latihan25B36109034.Visible = False Then
Latihan25B36109034.Show()
Else
Latihan25B36109034.Activate()
End If
BARIS = NURHIDAYAH.DefaultView(BindingContext(NURHIDAYAH).Position).Row
Latihan25B36109034.TextBox1_36109034.Text = BARIS("KODEBARANG")
Latihan25B36109034.TextBox2_36109034.Text = BARIS("NAMABARANG")
Latihan25B36109034.TextBox3_36109034.Text = BARIS("HARGAJUAL")
Latihan25B36109034.TextBox4_36109034.Text = BARIS("PERSEDIAANAWAL")
Latihan25B36109034.AmbilData()
End Sub
End Class
Public Class Latihan25B36109034
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim TRY1 As New DataTable
Dim TRY2 As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
TRY2 = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox1_36109034.Text & "'", CONECT)
TRY2.Fill(TRY1)
End Sub
Private Sub Latihan25B36109034_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DGV136109034.DataSource = TRY1
End Sub
End Class
Public Class Latihan26A36109034
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim NURHIDAYAH As New DataTable
Dim BARIS As DataRow
Dim BEDE As New OleDb.OleDbDataAdapter
Private Sub Latihan26A36109034_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
BEDE = New OleDb.OleDbDataAdapter("SELECT MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA,(DETAILTRANSAKSI.UNIT*DETAILTRANSAKSI.HARGA)AS JUMLAH, BARANG.KODEBARANG, BARANG.NAMABARANG,BARANG.HARGAJUAL,BARANG.PERSEDIAANAWAL FROM (MASTERTRANSAKSI INNER JOIN DETAILTRANSAKSI ON MASTERTRANSAKSI.NOTRANS=DETAILTRANSAKSI.NOTRANS) INNER JOIN BARANG ON DETAILTRANSAKSI.KODEBARANG=BARANG.KODEBARANG", CONECT)
BEDE.Fill(NURHIDAYAH)
DGV136109034.DataSource = NURHIDAYAH
End Sub
Private Sub KLIK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KLIK.Click
If Latihan26B36109034.Visible = False Then
Latihan26B36109034.Show()
Else
Latihan26B36109034.Activate()
End If
BARIS = NURHIDAYAH.DefaultView(BindingContext(NURHIDAYAH).Position).Row
Latihan26B36109034.TextBox1_36109034.Text = BARIS("KODEBARANG")
Latihan26B36109034.TextBox2_36109034.Text = BARIS("NAMABARANG")
Latihan26B36109034.TextBox3_36109034.Text = BARIS("HARGAJUAL")
Latihan26B36109034.TextBox4_36109034.Text = BARIS("PERSEDIAANAWAL")
Latihan26B36109034.AmbilData()
End Sub
End Class
Public Class Latihan26B36109034
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim GUE As New DataTable
Dim BEDE As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
BEDE = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA,(DETAILTRANSAKSI.UNIT * DETAILTRANSAKSI.HARGA)as JUMLAH from DETAILTRANSAKSI where KODEBARANG ='" & TextBox1_36109034.Text & "'", CONECT)
BEDE.Fill(GUE)
Dim tu, total As Integer
For Each x As DataRow In GUE.Rows
tu = tu + x("UNIT")
total = total + x("JUMLAH")
Next
TextBox5_36109034.Text = tu
TextBox6_36109034.Text = total
End Sub
Private Sub Latihan26B36109034_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DGV136109034.DataSource = GUE
End Sub
End Class
Public Class Form15_36109037
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Juni As New DataTable
Private Sub Form15_36109037_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select * from BARANG", CONECT)
adapter.Fill(Juni)
DataGridView1.DataSource = Juni
End Sub
End Class
Public Class Form16_36109037
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Juni As New DataTable
Private Sub Form16_36109037_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select * from MASTERTRANSAKSI", CONECT)
adapter.Fill(Juni)
DataGridView1.DataSource = Juni
End Sub
End Class
Public Class Form17_36109037
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Juni As New DataTable
Private Sub Form17_36109037_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select * from DETAILTRANSAKSI", CONECT)
adapter.Fill(Juni)
DataGridView1.DataSource = Juni
End Sub
End Class
Public Class Form18_36109037
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Juni As New DataTable
Private Sub Form18_36109037_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang", CONECT)
adapter.Fill(Juni)
DataGridView1.DataSource = Juni
End Sub
End Class
Komentar ini telah dihapus oleh pengarang.
BalasHapusPublic Class LATIHAN01536109040
BalasHapusDim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim armita As New DataTable
Dim mita As New OleDb.OleDbDataAdapter
Private Sub LATIHAN01536109040_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
mita = New OleDb.OleDbDataAdapter("select * from barang", connect)
mita.Fill(armita)
DataGridView1.DataSource = armita
End Sub
End class
Public Class LATIHAN01636109040
Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim armita As New DataTable
Dim mita As New OleDb.OleDbDataAdapter
Private Sub LATIHAN01636109040_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
mita = New OleDb.OleDbDataAdapter("select * from mastertransaksi", connect)
mita.Fill(armita)
DataGridView1.DataSource = armita
End Sub
End Class
Public Class LATIHAN01736109040
Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim armita As New DataTable
Dim mita As New OleDb.OleDbDataAdapter
Private Sub LATIHAN01736109040_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
mita = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", connect)
mita.Fill(armita)
DataGridView1.DataSource = armita
End Sub
End Class
Public Class LATIHAN01836109040
Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim armita As New DataTable
Dim mita As New OleDb.OleDbDataAdapter
Private Sub LATIHAN01836109040_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
mita = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang", connect)
mita.Fill(armita)
DataGridView1.DataSource = armita
End Sub
End Class
Public Class LATIHAN01936109040
BalasHapusDim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim armita As New DataTable
Dim mita As New OleDb.OleDbDataAdapter
Private Sub LATIHAN01936109040_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
mita = 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 ", connect)
mita.Fill(armita)
DataGridView1.DataSource = armita
End Sub
End Class
Public Class LATIHAN02036109040
Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim armita As New DataTable
Dim mita As New OleDb.OleDbDataAdapter
Private Sub LATIHAN02036109040_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
mita = 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 ", connect)
mita.Fill(armita)
DataGridView1.DataSource = armita
End Sub
End Class
Public Class LATIHAN02136109040
Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim armita As New DataTable
Dim mitaanak As New DataTable
Dim datset As New DataSet
Dim mita1 As New BindingSource
Dim mita2 As New BindingSource
Private Sub LATIHAN02136109040_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim uji1 As New OleDb.OleDbDataAdapter
Dim uji2 As New OleDb.OleDbDataAdapter
uji1 = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", connect)
uji1.Fill(armita)
uji2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", connect)
uji2.Fill(mitaanak)
armita.TableName = "induknya"
mitaanak.TableName = "anaknya"
datset.Tables.Add(armita)
datset.Tables.Add(mitaanak)
datset.Relations.Add(New DataRelation("cobaji", datset.Tables("induknya").Columns("NOTRANS"), datset.Tables("anaknya").Columns("NOTRANS")))
mita1.DataSource = datset
mita1.DataMember = "induknya"
mita2.DataSource = mita1
mita2.DataMember = "cobaji"
DataGridView1.DataSource = mita1
DataGridView2.DataSource = mita2
End Sub
End Class
Public Class LATIHAN02236109040
BalasHapusDim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim armita As New DataTable
Dim mitaanak As New DataTable
Dim datset As New DataSet
Dim mita1 As New BindingSource
Dim mita2 As New BindingSource
Private Sub LATIHAN02236109040_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim uji1 As New OleDb.OleDbDataAdapter
Dim uji2 As New OleDb.OleDbDataAdapter
uji1 = New OleDb.OleDbDataAdapter("select * from BARANG ", connect)
uji1.Fill(armita)
uji2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", connect)
uji2.Fill(mitaanak)
armita.TableName = "induknya"
mitaanak.TableName = "anaknya"
datset.Tables.Add(armita)
datset.Tables.Add(mitaanak)
datset.Relations.Add(New DataRelation("cobaji", datset.Tables("induknya").Columns("KODEBARANG"), datset.Tables("anaknya").Columns("KODEBARANG")))
mita1.DataSource = datset
mita1.DataMember = "induknya"
mita2.DataSource = mita1
mita2.DataMember = "cobaji"
DataGridView1.DataSource = mita1
End Sub
End Class
Private Sub LATIHAN023A36109040_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
BalasHapusDim cobaji As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select * from MASTERTRANSAKSI", connect)
cobaji.Fill(armita)
DataGridView1.DataSource = armita
End Sub
Private Sub KLIKK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KLIKK.Click
If LATIHAN023B36109040.Visible = False Then
LATIHAN023B36109040.Show()
Else
LATIHAN023B36109040.Activate()
End If
baris = armita.DefaultView(BindingContext(armita).Position).Row
LATIHAN023B36109040.TextBox1040.Text = baris("notrans")
LATIHAN023B36109040.TextBox3040.Text = baris("jenistransaksi")
LATIHAN023B36109040.DateTimePicker1040.Value = baris("tanggaltransaksi")
LATIHAN023B36109040.AmbilData()
End Sub
End Class
Public Class LATIHAN023B36109040
Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tesji As New DataTable
Dim cobaji As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
cobaji = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where NOTRANS ='" & TextBox1040.Text & "'", connect)
cobaji.Fill(tesji)
End Sub
Private Sub LATIHAN023B36109040_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DataGridView1.DataSource = tesji
End Sub
End Class
Public Class Latihan024A36109040
BalasHapusDim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim armita As New DataTable
Dim baris As DataRow
Private Sub Latihan024A36109040_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim uji1 As New OleDb.OleDbDataAdapter
uji1 = New OleDb.OleDbDataAdapter("select * from BARANG", connect)
uji1.Fill(armita)
DataGridView1.DataSource = armita
End Sub
Private Sub butoon2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butoon2.Click
If LATIHAN024B36109040.Visible = False Then
LATIHAN024B36109040.Show()
Else
LATIHAN024B36109040.Activate()
End If
baris = armita.DefaultView(BindingContext(armita).Position).Row
LATIHAN024B36109040.TextBox1040.Text = baris("KODEBARANG")
LATIHAN024B36109040.TextBox2040.Text = baris("NAMABARANG")
LATIHAN024B36109040.TextBox3040.Text = baris("HARGAJUAL")
LATIHAN024B36109040.TextBox4040.Text = baris("PERSEDIAANAWAL")
LATIHAN024B36109040.AmbilData()
End Sub
End Class
Public Class LATIHAN024B36109040
Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tesji As New DataTable
Dim uji1 As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
uji1 = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox1040.Text & "'", connect)
uji1.Fill(tesji)
End Sub
Private Sub LATIHAN024B36109040_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DataGridView1.DataSource = tesji
End Sub
End Class
Public Class LATIHAN025A36109040
BalasHapusDim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim armita As New DataTable
Dim baris As DataRow
Dim uji1 As New OleDb.OleDbDataAdapter
Private Sub LATIHAN025A36109040_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
uji1 = New OleDb.OleDbDataAdapter("select * from BARANG", connect)
uji1.Fill(armita)
DataGridView1.DataSource = armita
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If LATIHAN025B36109040.Visible = False Then
LATIHAN025B36109040.Show()
Else
LATIHAN025B36109040.Activate()
End If
baris = armita.DefaultView(BindingContext(armita).Position).Row
LATIHAN025B36109040.TextBox1.Text = baris("KODEBARANG")
LATIHAN025B36109040.TextBox2.Text = baris("NAMABARANG")
LATIHAN025B36109040.TextBox3.Text = baris("HARGAJUAL")
LATIHAN025B36109040.TextBox4.Text = baris("PERSEDIAANAWAL")
LATIHAN025B36109040.AmbilData()
End Sub
End Class
Public Class LATIHAN025B36109040
Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tesji As New DataTable
Dim uji1 As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
uji1 = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox1.Text & "'", connect)
uji1.Fill(tesji)
End Sub
Private Sub LATIHAN025B36109040_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DataGridView1.DataSource = tesji
End Sub
End Class
Public Class LATIHAN01536109051
BalasHapusDim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim NOVI As New DataTable
Private Sub latihan153619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select * from barang", konek)
cobaji.Fill(NOVI)
DGV136109051.DataSource = NOVI
End Sub
End Class
Public Class LATIHAN01636109051
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim novi As New DataTable
Private Sub latihan1636109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", conect)
cobaji.Fill(novi)
DGV136109051.DataSource = novi
End Sub
End Class
Public Class LATIHAN01736109051
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim novi As New DataTable
Private Sub latihan1736109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", conect)
cobaji.Fill(novi)
DGV136109051.DataSource = novi
End Sub
End Class
Public Class LATIHAN01836109051
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim novi As New DataTable
Private Sub latihan183619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang ", conect)
cobaji.Fill(novi)
DGV136109051.DataSource = novi
End Sub
End Class
Public Class LATIHAN02236109051
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim NOVI As New DataTable
Dim NOVIANI As New DataTable
Dim datset As New DataSet
Dim bin As New BindingSource
Dim bin2 As New BindingSource
Private Sub latihan2236109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
Dim cobaji2 As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select * from BARANG ", CONECT)
cobaji.Fill(NOVI)
cobaji2 = New OleDb.OleDbDataAdapter("select detailtransaksi.notrans, detailtransaksi.harga, detailtransaksi.unit, 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", CONECT)
cobaji2.Fill(NOVIANI)
NOVI.TableName = "induknya"
NOVIANI.TableName = "anaknya"
datset.Tables.Add(NOVI)
datset.Tables.Add(NOVIANI)
datset.Relations.Add(New DataRelation("cobaji", datset.Tables("induknya").Columns("KODEBARANG"), datset.Tables("anaknya").Columns("KODEBARANG")))
bin.DataSource = datset
bin.DataMember = "induknya"
bin2.DataSource = bin
bin2.DataMember = "cobaji"
DGV136109051.DataSource = bin
DGV236109051.DataSource = bin2
End Sub
End Class
Public Class LATIHAN023B36109049
BalasHapusDim KONEK As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim ruang As New DataTable
Dim kosong As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
kosong = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where NOTRANS ='" & TextBox136109049.Text & "'", KONEK)
kosong.Fill(ruang)
End Sub
Private Sub latihan023B_36109049_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DGV1_36109049.DataSource = ruang
End Sub
End Class
Public Class LATIHAN024A36109049
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim wirda As New DataTable
Dim baris As DataRow
Private Sub latihan024A3619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select * from BARANG", konek)
cobaji.Fill(wirda)
DGV136109049.DataSource = wirda
End Sub
Private Sub butoon2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button236109049.Click
If LATIHAN024B36109049.Visible = False Then
LATIHAN024B36109049.Show()
Else
LATIHAN024B36109049.Activate()
End If
baris = wirda.DefaultView(BindingContext(wirda).Position).Row
LATIHAN024B36109049.TextBox136109049.Text = baris("KODEBARANG")
LATIHAN024B36109049.TextBox236109049.Text = baris("NAMABARANG")
LATIHAN024B36109049.TextBox336109049.Text = baris("HARGAJUAL")
LATIHAN024B36109049.TextBox436109049.Text = baris("PERSEDIAANAWAL")
LATIHAN024B36109049.AmbilData()
End Sub
End Class
Public Class LATIHAN024B36109049
BalasHapusDim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim imajinasi As New DataTable
Dim conan As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
conan = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109049.Text & "'", konek)
conan.Fill(imajinasi)
End Sub
Private Sub latihan024B3619049_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DGV136109049.DataSource = imajinasi
End Sub
End Class
Public Class LATIHAN025A36109049
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim WIRDA As New DataTable
Dim baris As DataRow
Dim cobaji As New OleDb.OleDbDataAdapter
Private Sub latihan025B36109049_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
cobaji = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang ", CONECT)
cobaji.Fill(WIRDA)
DGV136109049.DataSource = WIRDA
End Sub
Private Sub butoon2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109049.Click
If LATIHAN025B36109049.Visible = False Then
LATIHAN025B36109049.Show()
Else
LATIHAN025B36109049.Activate()
End If
baris = WIRDA.DefaultView(BindingContext(WIRDA).Position).Row
LATIHAN025B36109049.TextBox136109049.Text = baris("KODEBARANG")
LATIHAN025B36109049.TextBox236109049.Text = baris("NAMABARANG")
LATIHAN025B36109049.TextBox336109049.Text = baris("HARGAJUAL")
LATIHAN025B36109049.TextBox436109049.Text = baris("PERSEDIAANAWAL")
LATIHAN025B36109049.AmbilData()
End Sub
End Class
maaf pak..saya sudah kasih masuk semua latihan berkali-kali..tapi tidak tahu kenapa sebagian tidak muncul di komentar..
BalasHapusjadi saya kasi masuk di http://www.novianimalnan.blogspot.com/
terima kasih...
Public Class LATIHAN01936109051
BalasHapusDim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim novi As New DataTable
Private Sub latihan1936109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.kodebarang, detailtransaksi.unit, detailtransaksi.harga from mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans ", conect)
cobaji.Fill(novi)
DGV136109051.DataSource = novi
End Sub
End Class
Public Class LATIHAN02036109051
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim novi As New DataTable
Private Sub latihan2036109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select 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 ", conect)
cobaji.Fill(novi)
DGV136109051.DataSource = novi
End Sub
End Class
Public Class LATIHAN025A36109051
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim NOVI As New DataTable
Dim baris As DataRow
Dim greenholic As New OleDb.OleDbDataAdapter
Private Sub latihan25A36109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
greenholic = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang ", CONECT)
greenholic.Fill(NOVI)
DGV136109051.DataSource = NOVI
End Sub
Private Sub butoon2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If latihan25B36109051.Visible = False Then
latihan25B36109051.Show()
Else
latihan25B36109051.Activate()
End If
baris = NOVI.DefaultView(BindingContext(NOVI).Position).Row
latihan25B36109051.TextBox136109051.Text = baris("KODEBARANG")
latihan25B36109051.TextBox236109051.Text = baris("NAMABARANG")
latihan25B36109051.TextBox336109051.Text = baris("HARGAJUAL")
latihan25B36109051.TextBox436109051.Text = baris("PERSEDIAANAWAL")
latihan25B36109051.AmbilData()
End Sub
End Class
Public Class latihan25B36109051
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim molnan As New DataTable
Dim gelang As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
gelang = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA,(DETAILTRANSAKSI.UNIT * DETAILTRANSAKSI.HARGA)as Jumlah from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109051.Text & "'", conect)
gelang.Fill(molnan)
End Sub
Private Sub latihan25B36109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DGV136109051.DataSource = molnan
End Sub
End Class
Public Class LATIHAN026A36109051
BalasHapusDim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim novi As New DataTable
Dim baris As DataRow
Dim adriana As New OleDb.OleDbDataAdapter
Private Sub latihan026A36109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
adriana = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang", conect)
adriana.Fill(novi)
DGV136109051.DataSource = novi
End Sub
Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If LATIHAN026B36109051.Visible = False Then
LATIHAN026B36109051.Show()
Else
LATIHAN026B36109051.Activate()
End If
baris = novi.DefaultView(BindingContext(novi).Position).Row
LATIHAN026B36109051.TextBox136109051.Text = baris("KODEBARANG")
LATIHAN026B36109051.TextBox236109051.Text = baris("NAMABARANG")
LATIHAN026B36109051.TextBox336109051.Text = baris("HARGAJUAL")
LATIHAN026B36109051.TextBox436109051.Text = baris("PERSEDIAANAWAL")
LATIHAN026B36109051.AmbilData()
End Sub
End Class
Public Class LATIHAN026B36109051
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim milanesta As New DataTable
Dim ekanaya As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
ekanaya = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA,(DETAILTRANSAKSI.UNIT * DETAILTRANSAKSI.HARGA)as Jumlah from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109051.Text & "'", conect)
ekanaya.Fill(milanesta)
Dim tu, total As Integer
For Each x As DataRow In milanesta.Rows
tu = tu + x("UNIT")
total = total + x("jumlah")
Next
TextBox536109051.Text = tu
TextBox636109051.Text = total
End Sub
Private Sub latihan26B36109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DGV136109051.DataSource = milanesta
End Sub
End Class
Public Class LATIHAN023A36109051
BalasHapusDim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim novi As New DataTable
Dim baris As DataRow
Private Sub latihan23A3619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select * from MASTERTRANSAKSI", conect)
cobaji.Fill(novi)
DGV136109051.DataSource = novi
End Sub
Private Sub BUTTON1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KLIK.Click
If LATIHAN023B36109051.Visible = False Then
LATIHAN023B36109051.Show()
Else
LATIHAN023B36109051.Activate()
End If
baris = novi.DefaultView(BindingContext(novi).Position).Row
LATIHAN023B36109051.TextBox136109051.Text = baris("notrans")
LATIHAN023B36109051.TextBox236109051.Text = baris("jenistransaksi")
LATIHAN023B36109051.DTP136109051.Value = baris("tanggaltransaksi")
LATIHAN023B36109051.AmbilData()
End Sub
End Class
Public Class Latihan024A36109051
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim novi As New DataTable
Dim baris As DataRow
Private Sub latihan24B36109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select * from BARANG", CONECT)
cobaji.Fill(novi)
DGV136109051.DataSource = novi
End Sub
Private Sub butoon2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butoon2.Click
If LATIHAN024B36109051.Visible = False Then
LATIHAN024B36109051.Show()
Else
LATIHAN024B36109051.Activate()
End If
baris = novi.DefaultView(BindingContext(novi).Position).Row
LATIHAN024B36109051.TextBox136109051.Text = baris("KODEBARANG")
LATIHAN024B36109051.TextBox236109051.Text = baris("NAMABARANG")
LATIHAN024B36109051.TextBox336109051.Text = baris("HARGAJUAL")
LATIHAN024B36109051.TextBox436109051.Text = baris("PERSEDIAANAWAL")
LATIHAN024B36109051.AmbilData()
End Sub
End Class
Komentar ini telah dihapus oleh pengarang.
BalasHapusPublic Class LATIHAN024B36109051
BalasHapusDim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tesji As New DataTable
Dim cobaji As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
cobaji = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109051.Text & "'", conect)
cobaji.Fill(tesji)
End Sub
Private Sub latihan024B36109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DGV136109051.DataSource = tesji
End Sub
End Class
Public Class LATIHAN023B36109051
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tesji As New DataTable
Dim cobaji As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
cobaji = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where NOTRANS ='" & TextBox136109051.Text & "'", CONECT)
cobaji.Fill(tesji)
End Sub
Private Sub LATIHAN023B36109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DGV136109051.DataSource = tesji
End Sub
End Class
Public Class LATIHAN02136109051
BalasHapusDim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim novi As New DataTable
Dim noviani As New DataTable
Dim datset As New DataSet
Dim bin As New BindingSource
Dim bin2 As New BindingSource
Private Sub latihan2136109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
Dim cobaji2 As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", conect)
cobaji.Fill(novi)
cobaji2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", conect)
cobaji2.Fill(noviani)
novi.TableName = "induknya"
noviani.TableName = "anaknya"
datset.Tables.Add(novi)
datset.Tables.Add(noviani)
datset.Relations.Add(New DataRelation("cobaji", datset.Tables("induknya").Columns("NOTRANS"), datset.Tables("anaknya").Columns("NOTRANS")))
bin.DataSource = datset
bin.DataMember = "induknya"
bin2.DataSource = bin
bin2.DataMember = "cobaji"
DGV136109051.DataSource = bin
DGV236109051.DataSource = bin2
End Sub
End Class
Public Class Form1936109050
BalasHapusDim conect As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim uni As New DataTable
Private Sub Form1936109050_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = 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", conect)
adapter.Fill(uni)
DataGridView1.DataSource = uni
End Sub
End Class
Public Class Form2036109050
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim uni As New DataTable
Private Sub Form2036109050_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim nideria As New OleDb.OleDbDataAdapter
nideria = 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 ", konek)
nideria.Fill(uni)
DataGridView1.DataSource = uni
End Sub
End Class
Public Class Form2136109050
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim uni As New DataTable
Dim uni2 As New DataTable
Dim datset As New DataSet
Dim bin As New BindingSource
Dim bin2 As New BindingSource
Private Sub form2136109050_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim nideria As New OleDb.OleDbDataAdapter
Dim nideria2 As New OleDb.OleDbDataAdapter
nideria = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", konek)
nideria.Fill(uni)
nideria2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", konek)
nideria2.Fill(uni2)
uni.TableName = "induknya"
uni2.TableName = "anaknya"
datset.Tables.Add(uni)
datset.Tables.Add(uni2)
datset.Relations.Add(New DataRelation("nideria", datset.Tables("induknya").Columns("NOTRANS"), datset.Tables("anaknya").Columns("NOTRANS")))
bin.DataSource = datset
bin.DataMember = "induknya"
bin2.DataSource = bin
bin2.DataMember = "nideria"
DataGridView1.DataSource = bin
DataGridView2.DataSource = bin2
End Sub
End Class
Komentar ini telah dihapus oleh pengarang.
BalasHapusPublic Class LATIHAN026A36109049
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim WIRDA As New DataTable
Dim baris As DataRow
Dim terang As New OleDb.OleDbDataAdapter
Private Sub latihan26A36109049_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
terang = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang", CONECT)
terang.Fill(WIRDA)
DGV136109049.DataSource = WIRDA
End Sub
Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109049.Click
If LATIHAN026B36109049.Visible = False Then
LATIHAN026B36109049.Show()
Else
LATIHAN026B36109049.Activate()
End If
baris = WIRDA.DefaultView(BindingContext(WIRDA).Position).Row
LATIHAN026B36109049.TextBox136109049.Text = baris("KODEBARANG")
LATIHAN026B36109049.TextBox236109049.Text = baris("NAMABARANG")
LATIHAN026B36109049.TextBox336109049.Text = baris("HARGAJUAL")
LATIHAN026B36109049.TextBox436109049.Text = baris("PERSEDIAANAWAL")
LATIHAN026B36109049.AmbilData()
End Sub
End Class
Public Class LATIHAN026B36109049
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim KAMPUS As New DataTable
Dim KULIAH As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
KULIAH = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA,(DETAILTRANSAKSI.UNIT * DETAILTRANSAKSI.HARGA)as Jumlah from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109049.Text & "'", CONECT)
KULIAH.Fill(KAMPUS)
Dim tu, total As Integer
For Each x As DataRow In KAMPUS.Rows
tu = tu + x("UNIT")
total = total + x("jumlah")
Next
TextBox536109049.Text = tu
TextBox636109049.Text = total
End Sub
Private Sub latihan026B36109049_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DGV136109049.DataSource = KAMPUS
End Sub
End Class
Public Class Form24A36109050
BalasHapusDim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim uni As New DataTable
Dim baris As DataRow
Private Sub Form24A36109050_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select * from BARANG", konek)
cobaji.Fill(uni)
DataGridView1.DataSource = uni
End Sub
Private Sub butoon2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butoon2.Click
If Form24B36109050.Visible = False Then
Form24B36109050.Show()
Else
Form24B36109050.Activate()
End If
baris = uni.DefaultView(BindingContext(uni).Position).Row
Form24B36109050.TextBox1.Text = baris("KODEBARANG")
Form24B36109050.TextBox2.Text = baris("NAMABARANG")
Form24B36109050.TextBox3.Text = baris("HARGAJUAL")
Form24B36109050.TextBox4.Text = baris("PERSEDIAANAWAL")
Form24B36109050.AmbilData()
End Sub
End Class
Public Class Form24B36109050
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tesji As New DataTable
Dim cobaji As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
cobaji = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox1.Text & "'", konek)
cobaji.Fill(tesji)
End Sub
Private Sub Form24B36109050_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DataGridView1.DataSource = tesji
End Sub
End Class
Public Class Form25A36109050
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim uni As New DataTable
Dim baris As DataRow
Dim cobaji As New OleDb.OleDbDataAdapter
Private Sub Form25A36109050_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
cobaji = New OleDb.OleDbDataAdapter("select * from BARANG", konek)
cobaji.Fill(uni)
DataGridView1.DataSource = uni
End Sub
Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Form25B36109050.Visible = False Then
Form25B36109050.Show()
Else
Form25B36109050.Activate()
End If
baris = uni.DefaultView(BindingContext(uni).Position).Row
Form25B36109050.TextBox1.Text = baris("KODEBARANG")
Form25B36109050.TextBox2.Text = baris("NAMABARANG")
Form25B36109050.TextBox3.Text = baris("HARGAJUAL")
Form25B36109050.TextBox4.Text = baris("PERSEDIAANAWAL")
Form25B36109050.AmbilData()
End Sub
End Class
Komentar ini telah dihapus oleh pengarang.
BalasHapusPublic Class Form25B36109050
BalasHapusDim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tesji As New DataTable
Dim cobaji As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
cobaji = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox1.Text & "'", konek)
cobaji.Fill(tesji)
End Sub
Private Sub Form25B36109050_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DataGridView1.DataSource = tesji
End Sub
End Class
Public Class Form26A36109050
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim uni As New DataTable
Dim baris As DataRow
Dim cobaji As New OleDb.OleDbDataAdapter
Private Sub Form26A36109050_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
cobaji = New OleDb.OleDbDataAdapter("select * from BARANG", konek)
cobaji.Fill(uni)
DataGridView1.DataSource = uni
End Sub
Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Form26B36109050.Visible = False Then
Form26B36109050.Show()
Else
Form26B36109050.Activate()
End If
baris = uni.DefaultView(BindingContext(uni).Position).Row
Form26B36109050.TextBox1.Text = baris("KODEBARANG")
Form26B36109050.TextBox2.Text = baris("NAMABARANG")
Form26B36109050.TextBox3.Text = baris("HARGAJUAL")
Form26B36109050.TextBox4.Text = baris("PERSEDIAANAWAL")
Form26B36109050.AmbilData()
End Sub
End Class
Public Class Form26B36109050
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tesji As New DataTable
Dim cobaji As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
cobaji = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox1.Text & "'", konek)
cobaji.Fill(tesji)
Dim tu, total As Integer
For Each x As DataRow In tesji.Rows
tu = tu + x("UNIT")
total = total + x("HARGA")
Next
TextBox5.Text = tu
TextBox6.Text = total
End Sub
Private Sub Form26B36109050_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DataGridView1.DataSource = tesji
End Sub
End Class
LATIHAN 019 36109038
BalasHapusPublic Class LATIHAN01936109038
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Icha As New DataTable
Private Sub LATIHAN01936109038_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = 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", CONECT)
adapter.Fill(Icha)
DataGridView136109038.DataSource = Icha
End Sub
End Class
LATIHAN 020 36109038
Public Class LATIHAN02036109038
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Icha As New DataTable
Private Sub LATIHAN02036109038_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = 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", CONECT)
adapter.Fill(Icha)
DataGridView136109038.DataSource = Icha
End Sub
End Class
LATIHAN 021 36109038
Public Class LATIHAN02136109038
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Icha As New DataTable
Dim Ichaanak As New DataTable
Dim datset As New DataSet
Dim bin As New BindingSource
Dim bin2 As New BindingSource
Private Sub LATIHAN02136109038_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim coba As New OleDb.OleDbDataAdapter
Dim coba2 As New OleDb.OleDbDataAdapter
coba = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", CONECT)
coba.Fill(Icha)
coba2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", CONECT)
coba2.Fill(Ichaanak)
Icha.TableName = "induknya"
Ichaanak.TableName = "anaknya"
datset.Tables.Add(Icha)
datset.Tables.Add(Ichaanak)
datset.Relations.Add(New DataRelation("coba", datset.Tables("induknya").Columns("NOTRANS"), datset.Tables("anaknya").Columns("NOTRANS")))
bin.DataSource = datset
bin.DataMember = "induknya"
bin2.DataSource = bin
bin2.DataMember = "coba"
DataGridView136109038.DataSource = bin
DataGridView236109038.DataSource = bin2
End Sub
End Class
Public Class LATIHAN015_36109049
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim wirda As New DataTable
Private Sub LATIHAN01536109049_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select * from barang", CONECT)
adapter.Fill(wirda)
DGV1_36109049.DataSource = wirda
End Sub
End Class
Public Class LATIHAN016_36109049
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim wirda As New DataTable
Private Sub LATIHAN01536109049_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select * from mastertransaksi", CONECT)
adapter.Fill(wirda)
DGV1_36109049.DataSource = wirda
End Sub
Private Sub DGV1_36109049_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DGV1_36109049.CellContentClick
End Sub
End Class
Public Class LATIHAN017_36109049
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim wirda As New DataTable
Private Sub LATIHAN01536109049_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select * from detailtransaksi", CONECT)
adapter.Fill(wirda)
DGV1_36109049.DataSource = wirda
End Sub
End Class
Public Class LATIHAN018_36109049
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim wirda As New DataTable
Private Sub LATIHAN01836109049_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang", CONECT)
adapter.Fill(wirda)
DGV1_36109049.DataSource = wirda
End Sub
Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DGV1_36109049.CellContentClick
End Sub
End Class
LATIHAN 022 36109038
BalasHapusPublic Class LATIHAN02236109038
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Icha As New DataTable
Dim Ichaanak As New DataTable
Dim datset As New DataSet
Dim bin As New BindingSource
Dim bin2 As New BindingSource
Private Sub LATIHAN02236109038_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim coba As New OleDb.OleDbDataAdapter
Dim coba2 As New OleDb.OleDbDataAdapter
coba = New OleDb.OleDbDataAdapter("select * from BARANG ", CONECT)
coba.Fill(Icha)
coba2 = New OleDb.OleDbDataAdapter("select detailtransaksi.notrans, detailtransaksi.harga, detailtransaksi.unit, 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", CONECT)
coba2.Fill(Ichaanak)
Icha.TableName = "induknya"
Ichaanak.TableName = "anaknya"
datset.Tables.Add(Icha)
datset.Tables.Add(Ichaanak)
datset.Relations.Add(New DataRelation("coba", datset.Tables("induknya").Columns("KODEBARANG"), datset.Tables("anaknya").Columns("KODEBARANG")))
bin.DataSource = datset
bin.DataMember = "induknya"
bin2.DataSource = bin
bin2.DataMember = "coba"
DataGridView1.DataSource = bin
DataGridView2.DataSource = bin2
End Sub
End Class
LATIHAN 023A 36109038
Public Class LATIHAN023A36109038
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Icha As New DataTable
Dim baris As DataRow
Private Sub LATIHAN023A36109038_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim coba As New OleDb.OleDbDataAdapter
coba = New OleDb.OleDbDataAdapter("select * from MASTERTRANSAKSI", CONECT)
coba.Fill(Icha)
DataGridView1.DataSource = Icha
End Sub
Private Sub BUTTON1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BUTTON1.Click
If LATIHAN023B36109038.Visible = False Then
LATIHAN023B36109038.Show()
Else
LATIHAN023B36109038.Activate()
End If
baris = Icha.DefaultView(BindingContext(Icha).Position).Row
LATIHAN023B36109038.TextBox1.Text = baris("notrans")
LATIHAN023B36109038.TextBox2.Text = baris("jenistransaksi")
LATIHAN023B36109038.DateTimePicker1.Value = baris("tanggaltransaksi")
LATIHAN023B36109038.AmbilData()
End Sub
End Class
LATIHAN 023B 36109038
Public Class LATIHAN023B36109038
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tesji As New DataTable
Dim coba As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
coba = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where NOTRANS ='" & TextBox1.Text & "'", CONECT)
coba.Fill(tesji)
End Sub
Private Sub LATIHAN023B36109038_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DataGridView1.DataSource = tesji
End Sub
End Class
LATIHAN 025B 36109038
BalasHapusPublic Class LATIHAN025B36109038
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tesji As New DataTable
Dim coba As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
coba = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox1.Text & "'", CONECT)
coba.Fill(tesji)
End Sub
Private Sub latihan25B3619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DataGridView1.DataSource = tesji
End Sub
End Class
LATIHAN 026A 36109038
Public Class LATIHAN026A36109038
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Icha As New DataTable
Dim baris As DataRow
Dim coba As New OleDb.OleDbDataAdapter
Private Sub latihan26A3619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
coba = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang", CONECT)
coba.Fill(Icha)
DataGridView1.DataSource = Icha
End Sub
Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If LATIHAN026B36109038.Visible = False Then
LATIHAN026B36109038.Show()
Else
LATIHAN026B36109038.Activate()
End If
baris = Icha.DefaultView(BindingContext(Icha).Position).Row
LATIHAN026B36109038.TextBox1.Text = baris("KODEBARANG")
LATIHAN026B36109038.TextBox2.Text = baris("NAMABARANG")
LATIHAN026B36109038.TextBox3.Text = baris("HARGAJUAL")
LATIHAN026B36109038.TextBox4.Text = baris("PERSEDIAANAWAL")
LATIHAN026B36109038.AmbilData()
End Sub
End Class
LATIHAN 026B 36109038
Public Class LATIHAN026B36109038
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tesji As New DataTable
Dim coba As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
coba = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox1.Text & "'", CONECT)
coba.Fill(tesji)
Dim tu, total As Integer
For Each x As DataRow In tesji.Rows
tu = tu + x("UNIT")
total = total + x("HARGA")
Next
TextBox5.Text = tu
TextBox6.Text = total
End Sub
Private Sub latihan26B3619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DataGridView1.DataSource = tesji
End Sub
End Class
Public Class LATIHAN01536109029
BalasHapusDim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim cute As New DataTable
Private Sub LATIHAN01536109029_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select * from barang", connect)
adapter.Fill(cute)
DataGridView1.DataSource = cute
End Sub
Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick
End Sub
End Class
Public Class LATIHAN01636109029
Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim cute As New DataTable
Private Sub LATIHAN01636109029_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select * from mastertransaksi", connect)
adapter.Fill(cute)
DataGridView1.DataSource = cute
End Sub
Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick
End Sub
End Class
Public Class LATIHAN01736109029
Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim cute As New DataTable
Private Sub LATIHAN01736109029_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select * from detailtransaksi", connect)
adapter.Fill(cute)
DataGridView1.DataSource = cute
End Sub
Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick
End Sub
End Class
Public Class latihan183619029
Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim cute As New DataTable
Private Sub latihan183619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang ", connect)
cobaji.Fill(cute)
DataGridView1.DataSource = cute
End Sub
End Class
Public Class LATIHAN01536109054
BalasHapusDim Jembatan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source= D:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb")
Dim Bakpenampung As New DataTable
Private Sub Latihan01536109054_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim X As New OleDb.OleDbDataAdapter
X = New OleDb.OleDbDataAdapter("select* from barang", Jembatan)
X.Fill(Bakpenampung)
X.Dispose()
DataGridView136109054.DataSource = Bakpenampung
End Sub
End Class
Public Class LATIHAN01636109054
Dim Jembatan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source= D:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb")
Dim Bakpenampung As New DataTable
Private Sub Latihan01636109054_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim X As New OleDb.OleDbDataAdapter
X = New OleDb.OleDbDataAdapter("select* FROM MASTERTRANSAKSI", Jembatan)
X.Fill(Bakpenampung)
X.Dispose()
DataGridView136109054.DataSource = Bakpenampung
End Sub
End Class
Public Class LATIHAN01736109054
Dim Jembatan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source= D:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb")
Dim Bakpenampung As New DataTable
Private Sub Latihan01736109054_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim X As New OleDb.OleDbDataAdapter
X = New OleDb.OleDbDataAdapter("select* FROM DETAILTRANSAKSI", Jembatan)
X.Fill(Bakpenampung)
X.Dispose()
DataGridView136109054.DataSource = Bakpenampung
End Sub
End Class
Public Class LATIHAN01836109054
BalasHapusDim Jembatan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source= d:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb")
Dim Bakpenampung As New DataTable
Private Sub Latihan01836109054_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim X As New OleDb.OleDbDataAdapter
X = New OleDb.OleDbDataAdapter("select detailtransaksi.notrans,Detailtransaksi.Unit,detailtransaksi.Harga,barang.namabarang,barang.kodebarang from detailTransaksi Inner Join Barang On Detailtransaksi.kodebarang = barang.kodebarang", Jembatan)
X.Fill(Bakpenampung)
X.Dispose()
DataGridView136109054.DataSource = Bakpenampung
End Sub
End Class
Public Class LATIHAN01901236109054
Dim Jembatan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source= d:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb")
Dim Bakpenampung As New DataTable
Private Sub Latihan01936109054_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim X As New OleDb.OleDbDataAdapter
X = 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", Jembatan)
X.Fill(Bakpenampung)
X.Dispose()
DataGridView136109054.DataSource = Bakpenampung
End Sub
End Class
Public Class LATIHAN02036109054
Dim Jembatan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source= d:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb")
Dim Bakpenampung As New DataTable
Private Sub Latihan02036109054_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim X As New OleDb.OleDbDataAdapter
X = 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", Jembatan)
X.Fill(Bakpenampung)
X.Dispose()
DataGridView136109054.DataSource = Bakpenampung
End Sub
End Class
Public Class LATIHAN02136109054
BalasHapusDim Konek As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =d:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb")
Dim Bak As New DataTable
Dim Mandi As New DataTable
Dim dtset As New DataSet
Dim bs1 As New BindingSource
Dim bs2 As New BindingSource
Private Sub Latihan02136109054_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim x As New OleDb.OleDbDataAdapter
x = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", Konek)
x.Fill(Bak)
x.Dispose()
Dim y As New OleDb.OleDbDataAdapter
y = New OleDb.OleDbDataAdapter("select * from DETAILTRANSAKSI ", Konek)
y.Fill(Mandi)
y.Dispose()
Bak.TableName = "ibu"
Mandi.TableName = "anak"
dtset.Tables.Add(Bak)
dtset.Tables.Add(Mandi)
dtset.Relations.Add(New DataRelation("hubung1", dtset.Tables("ibu").Columns("NOTRANS"), dtset.Tables("anak").Columns("NOTRANS")))
bs1.DataSource = dtset
bs1.DataMember = "ibu"
bs2.DataSource = bs1
bs2.DataMember = "hubung1"
DataGridView136109054.DataSource = bs1
DataGridView236109054.DataSource = bs2
End Sub
End Class
Public Class LATIHAN02236109054
Dim Konek As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =d:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb")
Dim Bak As New DataTable
Dim Mandi As New DataTable
Dim dtset As New DataSet
Dim bs1 As New BindingSource
Dim bs2 As New BindingSource
Private Sub Latihan02236109054_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim x As New OleDb.OleDbDataAdapter
x = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", Konek)
x.Fill(Bak)
x.Dispose()
Dim y As New OleDb.OleDbDataAdapter
y = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG,DETAILTRANSAKSI.UNIT,DETAILTRANSAKSI.HARGA,BARANG.NAMABARANG, UNIT * HARGA AS JUMLAHREALISASI, UNIT * HARGAJUAL AS JUMLAHSTANDAR FROM DETAILTRANSAKSI INNER JOIN BARANG ON DETAILTRANSAKSI.KODEBARANG = BARANG.KODEBARANG ", Konek)
y.Fill(Mandi)
y.Dispose()
Bak.TableName = "ibu"
Mandi.TableName = "anak"
dtset.Tables.Add(Bak)
dtset.Tables.Add(Mandi)
dtset.Relations.Add(New DataRelation("hubung1", dtset.Tables("ibu").Columns("NOTRANS"), dtset.Tables("anak").Columns("NOTRANS")))
bs1.DataSource = dtset
bs1.DataMember = "ibu"
bs2.DataSource = bs1
bs2.DataMember = "hubung1"
DataGridView136109054.DataSource = bs1
DataGridView236109054.DataSource = bs2
End Sub
End Class
Public Class LATIHAN023A36109054
BalasHapusDim Kendaraan As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =d:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb")
Dim Penampung As New DataTable
Private Sub Latihan023A36109054_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Mobil As New OleDb.OleDbDataAdapter
Mobil = New OleDb.OleDbDataAdapter("SELECT * FROM MASTERTRANSAKSI", Kendaraan)
Penampung.Rows.Clear()
Mobil.Fill(Penampung)
Mobil.Dispose()
DataGridView136109054.DataSource = Penampung
End Sub
Private Sub KLIKK36109054_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KLIKK36109054.Click
LATIHAN023B36109054.Show()
LATIHAN023B36109054.TextBox136109054.Text = DataGridView136109054.CurrentRow.Cells("NOTRANS").Value
LATIHAN023B36109054.DateTimePicker136109054.Text = DataGridView136109054.CurrentRow.Cells("TANGGALTRANSAKSI").Value
LATIHAN023B36109054.TextBox336109054.Text = DataGridView136109054.CurrentRow.Cells("JENISTRANSAKSI").Value
LATIHAN023B36109054.AmbilDataDetail()
End Sub
End Class
Public Class LATIHAN023B36109054
Dim Kendaraan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source= D:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb")
Dim Penampung As New DataTable
Public Sub AmbilDataDetail()
Dim x As New OleDb.OleDbDataAdapter
x = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where NOTRANS ='" & TextBox136109054.Text & "'", Kendaraan)
Penampung.Rows.Clear()
x.Fill(Penampung)
x.Dispose()
End Sub
Private Sub Latihan023B361090542_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilDataDetail()
DGV136109054.DataSource = Penampung
End Sub
End Class
Public Class LATIHAN01536109048
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim TRIES As New DataTable
Private Sub latihan1536109048_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select * from barang", CONECT)
cobaji.Fill(TRIES)
DGV136109048.DataSource = TRIES
End Sub
End Class
Public Class LATIHAN01636109048
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim TRIES As New DataTable
Private Sub latihan163610948_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", CONECT)
cobaji.Fill(TRIES)
DGV136109048.DataSource = TRIES
End Sub
End Class
Public Class LATIHAN01736109048
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim TRIES As New DataTable
Private Sub latihan173610948_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", CONECT)
cobaji.Fill(TRIES)
DGV136109048.DataSource = TRIES
End Sub
End Class
Public Class LATIHAN01836109048
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim TRIES As New DataTable
Private Sub latihan183619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang ", CONECT)
cobaji.Fill(TRIES)
DGV136109048.DataSource = TRIES
End Sub
End Class
Public Class LATIHAN01936109048
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim TRIES As New DataTable
Private Sub latihan1936109048_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.kodebarang, detailtransaksi.unit, detailtransaksi.harga from mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans ", CONECT)
cobaji.Fill(TRIES)
DGV136109048.DataSource = TRIES
End Sub
End Class
Public Class LATIHAN02036109048
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim TRIES As New DataTable
Private Sub latihan2036109048_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select 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 ", CONECT)
cobaji.Fill(TRIES)
DGV136109048.DataSource = TRIES
End Sub
End Class
Public Class LATIHAN02136109048
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim TRIES As New DataTable
Dim TRIESNOVIANTY As New DataTable
Dim datset As New DataSet
Dim bin As New BindingSource
Dim bin2 As New BindingSource
Private Sub latihan213619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
Dim cobaji2 As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", CONECT)
cobaji.Fill(TRIES)
cobaji2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", CONECT)
cobaji2.Fill(TRIESNOVIANTY)
TRIES.TableName = "induknya"
TRIESNOVIANTY.TableName = "anaknya"
datset.Tables.Add(TRIES)
datset.Tables.Add(TRIESNOVIANTY)
datset.Relations.Add(New DataRelation("cobaji", datset.Tables("induknya").Columns("NOTRANS"), datset.Tables("anaknya").Columns("NOTRANS")))
bin.DataSource = datset
bin.DataMember = "induknya"
bin2.DataSource = bin
bin2.DataMember = "cobaji"
DGV136109048.DataSource = bin
DGV236109048.DataSource = bin2
End Sub
End Class
Public Class LATIHAN02236109048
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim TRIES As New DataTable
Dim TRIESNOVIANTY As New DataTable
Dim datset As New DataSet
Dim bin As New BindingSource
Dim bin2 As New BindingSource
Private Sub latihan2236109048_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim BUKU As New OleDb.OleDbDataAdapter
Dim PULPEN As New OleDb.OleDbDataAdapter
BUKU = New OleDb.OleDbDataAdapter("select * from BARANG ", CONECT)
BUKU.Fill(TRIES)
PULPEN = New OleDb.OleDbDataAdapter("select detailtransaksi.notrans, detailtransaksi.harga, detailtransaksi.unit, 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", CONECT)
PULPEN.Fill(TRIESNOVIANTY)
TRIES.TableName = "induknya"
TRIESNOVIANTY.TableName = "anaknya"
datset.Tables.Add(TRIES)
datset.Tables.Add(TRIESNOVIANTY)
datset.Relations.Add(New DataRelation("cobaji", datset.Tables("induknya").Columns("KODEBARANG"), datset.Tables("anaknya").Columns("KODEBARANG")))
bin.DataSource = datset
bin.DataMember = "induknya"
bin2.DataSource = bin
bin2.DataMember = "cobaji"
DGV136109048.DataSource = bin
DGV236109048.DataSource = bin2
End Sub
End Class
Public Class LATIHAN023A36109048
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim TRIES As New DataTable
Dim baris As DataRow
Private Sub LATIHAN023A36109048_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select * from MASTERTRANSAKSI", konek)
cobaji.Fill(TRIES)
DGV136109048.DataSource = TRIES
End Sub
Private Sub BUTTON1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KLIK36109048.Click
If LATIHAN023B36109048.Visible = False Then
LATIHAN023B36109048.Show()
Else
LATIHAN023B36109048.Activate()
End If
baris = TRIES.DefaultView(BindingContext(TRIES).Position).Row
LATIHAN023B36109048.TextBox136109048.Text = baris("notrans")
LATIHAN023B36109048.TextBox236109048.Text = baris("jenistransaksi")
LATIHAN023B36109048.DTP136109048.Value = baris("tanggaltransaksi")
LATIHAN023B36109048.AmbilData()
End Sub
End Class
Public Class LATIHAN023B36109048
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim BAJU As New DataTable
Dim cobaji As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
cobaji = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where NOTRANS ='" & TextBox136109048.Text & "'", konek)
cobaji.Fill(BAJU)
End Sub
Private Sub latihan023B36109048_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DGV136109048.DataSource = BAJU
End Sub
End Class
Public Class LATIHAN025A36109054
BalasHapusDim konek As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =d:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb")
Dim sukma As New DataTable
Dim baris As DataRow
Dim cobaji As New OleDb.OleDbDataAdapter
Private Sub latihan25A3619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
cobaji = New OleDb.OleDbDataAdapter("select * from BARANG", konek)
cobaji.Fill(sukma)
DataGridView136109054.DataSource = sukma
End Sub
Private Sub butoon2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109054.Click
If LATIHAN025B36109054.Visible = False Then
LATIHAN025B36109054.Show()
Else
LATIHAN025B36109054.Activate()
End If
baris = sukma.DefaultView(BindingContext(sukma).Position).Row
LATIHAN025B36109054.TextBox136109054.Text = baris("KODEBARANG")
LATIHAN025B36109054.TextBox236109054.Text = baris("NAMABARANG")
LATIHAN025B36109054.TextBox336109054.Text = baris("HARGAJUAL")
LATIHAN025B36109054.TextBox436109054.Text = baris("PERSEDIAANAWAL")
LATIHAN025B36109054.AmbilData()
End Sub
End Class
Public Class LATIHAN025B36109054
Dim konek As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =d:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb")
Dim tesji As New DataTable
Dim cobaji As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
cobaji = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109054.Text & "'", konek)
cobaji.Fill(tesji)
End Sub
Private Sub latihan025B36109054_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DataGridView136109054.DataSource = tesji
End Sub
End Class
menangisskka terlalu banayak bede' karakternyaa,, padahal kan tidak jii.. buktinya kalian bisa.. yang berlebih itu kan lemakku..
BalasHapusPublic Class LATIHAN01536109033
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Tiwi As New DataTable
Private Sub LATIHAN01536109033_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select * from BARANG", CONECT)
adapter.Fill(Tiwi)
DataGridView1.DataSource = Tiwi
End Sub
End Class
Public Class LATIHAN01636109033
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Tiwi As New DataTable
Private Sub LATIHAN01636109033_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select * from MASTERTRANSAKSI", CONECT)
adapter.Fill(Tiwi)
DataGridView1.DataSource = Tiwi
End Sub
End Class
Public Class LATIHAN01736109033
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Tiwi As New DataTable
Private Sub LATIHAN01736109033_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select * from DETAILTRANSAKSI", CONECT)
adapter.Fill(Tiwi)
DataGridView1.DataSource = Tiwi
End Sub
End Class
Public Class LATIHAN01836109033
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Tiwi As New DataTable
Private Sub LATIHAN01836109033_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang", CONECT)
adapter.Fill(Tiwi)
DataGridView1.DataSource = Tiwi
End Sub
End Class
Public Class LATIHAN026A36109054
BalasHapusDim konek As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =d:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb")
Dim sukma As New DataTable
Dim baris As DataRow
Dim cobaji As New OleDb.OleDbDataAdapter
Private Sub latihan026A36109054_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
cobaji = New OleDb.OleDbDataAdapter("select * from BARANG", konek)
cobaji.Fill(sukma)
DataGridView136109054.DataSource = sukma
End Sub
Private Sub button136109054_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109054.Click
If LATIHAN026B36109054.Visible = False Then
LATIHAN026B36109054.Show()
Else
LATIHAN026B36109054.Activate()
End If
baris = sukma.DefaultView(BindingContext(sukma).Position).Row
LATIHAN026B36109054.TextBox136109054.Text = baris("KODEBARANG")
LATIHAN026B36109054.TextBox236109054.Text = baris("NAMABARANG")
LATIHAN026B36109054.TextBox336109054.Text = baris("HARGAJUAL")
LATIHAN026B36109054.TextBox436109054.Text = baris("PERSEDIAANAWAL")
LATIHAN026B36109054.AmbilData()
End Sub
End Class
Public Class LATIHAN026B36109054
Dim konek As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =d:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb")
Dim tesji As New DataTable
Dim cobaji As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
cobaji = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109054.Text & "'", konek)
cobaji.Fill(tesji)
Dim tu, total As Integer
For Each x As DataRow In tesji.Rows
tu = tu + x("UNIT")
total = total + x("HARGA")
Next
TextBox536109054.Text = tu
TextBox636109054.Text = total
End Sub
Private Sub latihan026B36109054_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DataGridView136109054.DataSource = tesji
End Sub
End Class
Public Class Latihan1536109046
BalasHapusDim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Eshafitri As New DataTable
Private Sub Latihan1536109046_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim juzttryboo As New OleDb.OleDbDataAdapter
juzttryboo = New OleDb.OleDbDataAdapter("select * from barang", conect)
juzttryboo.Fill(Eshafitri)
DataGridView136109046.DataSource = Eshafitri
End Sub
End Class
Public Class Latihan1636109046
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Eshafitri As New DataTable
Private Sub Latihan1636109046_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim juzttryboo As New OleDb.OleDbDataAdapter
juzttryboo = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", conect)
juzttryboo.Fill(Eshafitri)
DataGridView136109046.DataSource = Eshafitri
End Sub
End Class
Public Class Latihan1736109046
BalasHapusDim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Eshafitri As New DataTable
Private Sub Latihan1736109046_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim juzttryboo As New OleDb.OleDbDataAdapter
juzttryboo = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", conect)
juzttryboo.Fill(Eshafitri)
DataGridView136109046.DataSource = Eshafitri
End Sub
End Class
Public Class Latihan1836109046
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Eshafitri As New DataTable
Private Sub Latihan1836109046_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim juzttryboo As New OleDb.OleDbDataAdapter
juzttryboo = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang ", conect)
juzttryboo.Fill(Eshafitri)
DataGridView136109046.DataSource = Eshafitri
End Sub
End Class
Public Class Latihan1936109046
BalasHapusDim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Eshafitri As New DataTable
Private Sub Latihan1936109046_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim juzttryboo As New OleDb.OleDbDataAdapter
juzttryboo = 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 ", conect)
juzttryboo.Fill(Eshafitri)
DataGridView136109046.DataSource = Eshafitri
End Sub
End Class
Public Class Latihan2036109046
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Eshafitri As New DataTable
Private Sub Latihan2036109046_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim juzttryboo As New OleDb.OleDbDataAdapter
juzttryboo = 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 ", conect)
juzttryboo.Fill(Eshafitri)
DataGridView136109046.DataSource = Eshafitri
End Sub
End Class
Public Class Latihan2136109046
BalasHapusDim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Eshafitri As New DataTable
Dim Eshafitrianak As New DataTable
Dim datset As New DataSet
Dim bin As New BindingSource
Dim bin2 As New BindingSource
Private Sub Latihan2136109046_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim juzttryboo As New OleDb.OleDbDataAdapter
Dim juzttryboo2 As New OleDb.OleDbDataAdapter
juzttryboo = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", conect)
juzttryboo.Fill(Eshafitri)
juzttryboo2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", conect)
juzttryboo2.Fill(Eshafitrianak)
Eshafitri.TableName = "induknya"
Eshafitrianak.TableName = "anaknya"
datset.Tables.Add(Eshafitri)
datset.Tables.Add(Eshafitrianak)
datset.Relations.Add(New DataRelation("cobaji", datset.Tables("induknya").Columns("NOTRANS"), datset.Tables("anaknya").Columns("NOTRANS")))
bin.DataSource = datset
bin.DataMember = "induknya"
bin2.DataSource = bin
bin2.DataMember = "cobaji"
DataGridView136109046.DataSource = bin
DataGridView236109046.DataSource = bin2
End Sub
End Class
Public Class Latihan024A36109054
BalasHapusDim konek As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =d:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb")
Dim sukma As New DataTable
Dim baris As DataRow
Private Sub latihan024A36109054_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select * from BARANG", konek)
cobaji.Fill(sukma)
DataGridView136109054.DataSource = sukma
End Sub
Private Sub butoon236109054_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butoon236109054.Click
If LATIHAN024B36109054.Visible = False Then
LATIHAN024B36109054.Show()
Else
LATIHAN024B36109054.Activate()
End If
baris = sukma.DefaultView(BindingContext(sukma).Position).Row
LATIHAN024B36109054.TextBox136109054.Text = baris("KODEBARANG")
LATIHAN024B36109054.TextBox236109054.Text = baris("NAMABARANG")
LATIHAN024B36109054.TextBox336109054.Text = baris("HARGAJUAL")
LATIHAN024B36109054.TextBox436109054.Text = baris("PERSEDIAANAWAL")
LATIHAN024B36109054.AmbilData()
End Sub
End Class
Public Class LATIHAN024B36109054
Dim konek As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =d:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb")
Dim tesji As New DataTable
Dim cobaji As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
cobaji = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109054.Text & "'", konek)
cobaji.Fill(tesji)
End Sub
Private Sub latihan24B3619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DataGridView136109054.DataSource = tesji
End Sub
End Class
Public Class LATIHAN01936109033
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Tiwi As New DataTable
Private Sub LATIHAN019361090333_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = 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", CONECT)
adapter.Fill(Tiwi)
DataGridView1.DataSource = Tiwi
End Sub
End Class
Public Class LATIHAN02036109033
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Tiwi As New DataTable
Private Sub LATIHAN02036109033_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = 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", CONECT)
adapter.Fill(Tiwi)
DataGridView1.DataSource = Tiwi
End Sub
End Class
Public Class LATIHAN02136109033
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tiwi As New DataTable
Dim tiwianak As New DataTable
Dim datset As New DataSet
Dim binding As New BindingSource
Dim binding2 As New BindingSource
Private Sub LATIHAN02136109033_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
Dim cobaji2 As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", CONECT)
cobaji.Fill(tiwi)
cobaji2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", CONECT)
cobaji2.Fill(tiwianak)
tiwi.TableName = "induknya"
tiwianak.TableName = "anaknya"
datset.Tables.Add(tiwi)
datset.Tables.Add(tiwianak)
datset.Relations.Add(New DataRelation("cobaji", datset.Tables("induknya").Columns("NOTRANS"), datset.Tables("anaknya").Columns("NOTRANS")))
binding.DataSource = datset
binding.DataMember = "induknya"
binding2.DataSource = binding
binding2.DataMember = "cobaji"
DataGridView1.DataSource = binding
DataGridView2.DataSource = binding2
End Sub
End Class
Public Class Latihan2236109046
BalasHapusDim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Eshafitri As New DataTable
Dim Eshafitrianak As New DataTable
Dim datset As New DataSet
Dim bin As New BindingSource
Dim bin2 As New BindingSource
Private Sub Latihan2236109046_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim juzttryboo As New OleDb.OleDbDataAdapter
Dim juzttryboo2 As New OleDb.OleDbDataAdapter
juzttryboo = New OleDb.OleDbDataAdapter("select * from BARANG ", conect)
juzttryboo.Fill(Eshafitri)
juzttryboo2 = New OleDb.OleDbDataAdapter("select detailtransaksi.notrans, detailtransaksi.harga, detailtransaksi.unit, 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", conect)
juzttryboo2.Fill(Eshafitrianak)
Eshafitri.TableName = "induknya"
Eshafitrianak.TableName = "anaknya"
datset.Tables.Add(Eshafitri)
datset.Tables.Add(Eshafitrianak)
datset.Relations.Add(New DataRelation("cobaji", datset.Tables("induknya").Columns("KODEBARANG"), datset.Tables("anaknya").Columns("KODEBARANG")))
bin.DataSource = datset
bin.DataMember = "induknya"
bin2.DataSource = bin
bin2.DataMember = "cobaji"
DataGridView136109046.DataSource = bin
DataGridView236109046.DataSource = bin2
End Sub
End Class
Public Class Latihan23A36109046
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Eshafitri As New DataTable
Dim baris As DataRow
Private Sub Latihan23A36109046_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select * from MASTERTRANSAKSI", conect)
cobaji.Fill(Eshafitri)
DataGridView136109046.DataSource = Eshafitri
End Sub
Private Sub Button36109046_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button36109046.Click
If Latihan23B36109046.Visible = False Then
Latihan23B36109046.Show()
Else
Latihan23B36109046.Activate()
End If
baris = Eshafitri.DefaultView(BindingContext(Eshafitri).Position).Row
Latihan23B36109046.TextBox136109046.Text = baris("notrans")
Latihan23B36109046.TextBox36109046.Text = baris("jenistransaksi")
Latihan23B36109046.DateTimePicker36109046.Value = baris("tanggaltransaksi")
Latihan23B36109046.AmbilData()
End Sub
End Class
Public Class Latihan23B36109046
BalasHapusDim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim juzttryboo As New DataTable
Dim juzttryboo2 As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
juzttryboo2 = New OleDb.OleDbDataAdapter("select * from DETAILTRANSAKSI where NOTRANS ='" & TextBox136109046.Text & "'", conect)
juzttryboo2.Fill(juzttryboo)
End Sub
Private Sub Latihan23B36109046_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DataGridView136109046.DataSource = juzttryboo
End Sub
End Class
Public Class Latihan24A36109046
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Eshafitri As New DataTable
Dim baris As DataRow
Private Sub latihan24A3619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select * from BARANG", conect)
cobaji.Fill(Eshafitri)
DataGridView136109046.DataSource = Eshafitri
End Sub
Private Sub button136109046_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button136109046.Click
If Latihan24B36109046.Visible = False Then
Latihan24B36109046.Show()
Else
Latihan24B36109046.Activate()
End If
baris = Eshafitri.DefaultView(BindingContext(Eshafitri).Position).Row
Latihan24B36109046.TextBox136109046.Text = baris("KODEBARANG")
Latihan24B36109046.TextBox236109046.Text = baris("NAMABARANG")
Latihan24B36109046.TextBox336109046.Text = baris("HARGAJUAL")
Latihan24B36109046.TextBox436109046.Text = baris("PERSEDIAANAWAL")
Latihan24B36109046.AmbilData()
End Sub
End Class
Public Class Latihan024A36109048
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim TRIES As New DataTable
Dim baris As DataRow
Private Sub latihan24A36109048_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select * from BARANG", CONECT)
cobaji.Fill(TRIES)
DGV136109048.DataSource = TRIES
End Sub
Private Sub butoon2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BUTTON236109048.Click
If LATIHAN024B36109048.Visible = False Then
LATIHAN024B36109048.Show()
Else
LATIHAN024B36109048.Activate()
End If
baris = TRIES.DefaultView(BindingContext(TRIES).Position).Row
LATIHAN024B36109048.TextBox136109048.Text = baris("KODEBARANG")
LATIHAN024B36109048.TextBox236109048.Text = baris("NAMABARANG")
LATIHAN024B36109048.TextBox336109048.Text = baris("HARGAJUAL")
LATIHAN024B36109048.TextBox436109048.Text = baris("PERSEDIAANAWAL")
LATIHAN024B36109048.AmbilData()
End Sub
End Class
Public Class LATIHAN024B36109048
Dim konek As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim BANANA As New DataTable
Dim DURIAN As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
DURIAN = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where NOTRANS ='" & TextBox136109048.Text & "'", konek)
DURIAN.Fill(BANANA)
End Sub
Private Sub latihan024B36109048_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DGV136109048.DataSource = BANANA
End Sub
End Class
Public Class LATIHAN025A36109048
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim TRIES As New DataTable
Dim baris As DataRow
Dim RUMAH As New OleDb.OleDbDataAdapter
Private Sub latihan25A36109048_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
RUMAH = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang ", CONECT)
RUMAH.Fill(TRIES)
DGV136109048.DataSource = TRIES
End Sub
Private Sub butoon2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109048.Click
If LATIHAN025B36109048.Visible = False Then
LATIHAN025B36109048.Show()
Else
LATIHAN025B36109048.Activate()
End If
baris = TRIES.DefaultView(BindingContext(TRIES).Position).Row
LATIHAN025B36109048.TextBox136109048.Text = baris("KODEBARANG")
LATIHAN025B36109048.TextBox236109048.Text = baris("NAMABARANG")
LATIHAN025B36109048.TextBox336109048.Text = baris("HARGAJUAL")
LATIHAN025B36109048.TextBox436109048.Text = baris("PERSEDIAANAWAL")
LATIHAN025B36109048.AmbilData()
End Sub
End Class
Public Class Latihan24B36109046
BalasHapusDim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim juzttryboo As New DataTable
Dim juzttryboo2 As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
juzttryboo2 = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109046.Text & "'", conect)
juzttryboo2.Fill(juzttryboo)
End Sub
Private Sub Latihan24B3619046_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DataGridView136109046.DataSource = juzttryboo
End Sub
End Class
Public Class Latihan25A36109046
BalasHapusDim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Eshafitri As New DataTable
Dim baris As DataRow
Dim juzttryboo As New OleDb.OleDbDataAdapter
Private Sub latihan25A3619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
juzttryboo = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang ", conect)
juzttryboo.Fill(Eshafitri)
DataGridView136109046.DataSource = Eshafitri
End Sub
Private Sub Button136109046_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109046.Click
If Latihan25B36109046.Visible = False Then
Latihan25B36109046.Show()
Else
Latihan25B36109046.Activate()
End If
baris = Eshafitri.DefaultView(BindingContext(Eshafitri).Position).Row
Latihan25B36109046.TextBox136109046.Text = baris("KODEBARANG")
Latihan25B36109046.TextBox236109046.Text = baris("NAMABARANG")
Latihan25B36109046.TextBox336109046.Text = baris("HARGAJUAL")
Latihan25B36109046.TextBox436109046.Text = baris("PERSEDIAANAWAL")
Latihan25B36109046.AmbilData()
End Sub
End Class
Public Class LATIHAN025B36109048
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim UNGU As New DataTable
Dim BIRU As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
BIRU = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA,(DETAILTRANSAKSI.UNIT * DETAILTRANSAKSI.HARGA)as Jumlah from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109048.Text & "'", CONECT)
BIRU.Fill(UNGU)
End Sub
Private Sub latihan025B36109048_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DGV136109048.DataSource = UNGU
End Sub
End Class
Public Class LATIHAN026A36109048
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim TRIES As New DataTable
Dim baris As DataRow
Dim CANTIK As New OleDb.OleDbDataAdapter
Private Sub latihan26A36109048_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
CANTIK = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang", CONECT)
CANTIK.Fill(TRIES)
DGV136109048.DataSource = TRIES
End Sub
Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109048.Click
If LATIHAN026B36109048.Visible = False Then
LATIHAN026B36109048.Show()
Else
LATIHAN026B36109048.Activate()
End If
baris = TRIES.DefaultView(BindingContext(TRIES).Position).Row
LATIHAN026B36109048.TextBox136109048.Text = baris("KODEBARANG")
LATIHAN026B36109048.TextBox236109048.Text = baris("NAMABARANG")
LATIHAN026B36109048.TextBox336109048.Text = baris("HARGAJUAL")
LATIHAN026B36109048.TextBox436109048.Text = baris("PERSEDIAANAWAL")
LATIHAN026B36109048.AmbilData()
End Sub
End Class
Public Class LATIHAN026B36109048
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim MEJA As New DataTable
Dim KURSI As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
KURSI = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA,(DETAILTRANSAKSI.UNIT * DETAILTRANSAKSI.HARGA)as Jumlah from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109048.Text & "'", CONECT)
KURSI.Fill(MEJA)
Dim tu, total As Integer
For Each x As DataRow In MEJA.Rows
tu = tu + x("UNIT")
total = total + x("jumlah")
Next
TextBox5.Text = tu
TextBox6.Text = total
End Sub
Private Sub latihan026B36109048_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DGV136109048.DataSource = MEJA
End Sub
End Class
Public Class LATIHAN02236109033
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tiwi As New DataTable
Dim tiwianak As New DataTable
Dim datset As New DataSet
Dim binding As New BindingSource
Dim binding2 As New BindingSource
Private Sub LATIHAN02236109033_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobaji As New OleDb.OleDbDataAdapter
Dim cobacoba As New OleDb.OleDbDataAdapter
cobaji = New OleDb.OleDbDataAdapter("select * from BARANG ", CONECT)
cobaji.Fill(tiwi)
cobacoba = New OleDb.OleDbDataAdapter("select detailtransaksi.notrans, detailtransaksi.harga, detailtransaksi.unit, 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", CONECT)
cobacoba.Fill(tiwianak)
tiwi.TableName = "induknya"
tiwianak.TableName = "anaknya"
datset.Tables.Add(tiwi)
datset.Tables.Add(tiwianak)
datset.Relations.Add(New DataRelation("cobaji", datset.Tables("induknya").Columns("KODEBARANG"), datset.Tables("anaknya").Columns("KODEBARANG")))
binding.DataSource = datset
binding.DataMember = "induknya"
binding2.DataSource = binding
binding2.DataMember = "cobaji"
DataGridView1.DataSource = binding
DataGridView2.DataSource = binding2
End Sub
End Class
Public Class LATIHAN023A36109033
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tiwi As New DataTable
Dim baris As DataRow
Private Sub LATIHAN023A36109033_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobacoba As New OleDb.OleDbDataAdapter
cobacoba = New OleDb.OleDbDataAdapter("select * from MASTERTRANSAKSI", CONECT)
cobacoba.Fill(tiwi)
DataGridView1.DataSource = tiwi
End Sub
Private Sub button36109033_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button36109033.Click
If LATIHAN023B36109033.Visible = False Then
LATIHAN023B36109033.Show()
Else
LATIHAN023B36109033.Activate()
End If
baris = tiwi.DefaultView(BindingContext(tiwi).Position).Row
LATIHAN023B36109033.TextBox136109033.Text = baris("notrans")
LATIHAN023B36109033.TextBox336109033.Text = baris("jenistransaksi")
LATIHAN023B36109033.DateTimePicker136109033.Value = baris("tanggaltransaksi")
LATIHAN023B36109033.AmbilData()
End Sub
End Class
Public Class LATIHAN023B36109033
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim testessaja As New DataTable
Dim cobacoba As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
cobacoba = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where NOTRANS ='" & TextBox136109033.Text & "'", CONECT)
cobacoba.Fill(testessaja)
End Sub
Private Sub LATIHAN023B36109033_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DataGridView1.DataSource = testessaja
End Sub
End Class
Public Class Latihan25B36109046
BalasHapusDim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim juzttryboo As New DataTable
Dim juzttryboo2 As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
juzttryboo2 = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109046.Text & "'", conect)
juzttryboo2.Fill(juzttryboo)
End Sub
Private Sub latihan25B3619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DataGridView1.DataSource = juzttryboo
End Sub
End Class
Public Class Latihan26A36109046
BalasHapusDim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Eshafitri As New DataTable
Dim baris As DataRow
Dim juzttryboo As New OleDb.OleDbDataAdapter
Private Sub Latihan26A36109046_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
juzttryboo = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang", conect)
juzttryboo.Fill(Eshafitri)
DataGridView36109046.DataSource = Eshafitri
End Sub
Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109046.Click
If Latihan26B36109046.Visible = False Then
Latihan26B36109046.Show()
Else
Latihan26B36109046.Activate()
End If
baris = Eshafitri.DefaultView(BindingContext(Eshafitri).Position).Row
Latihan26B36109046.TextBox136109046.Text = baris("KODEBARANG")
Latihan26B36109046.TextBox236109046.Text = baris("NAMABARANG")
Latihan26B36109046.TextBox336109046.Text = baris("HARGAJUAL")
Latihan26B36109046.TextBox436109046.Text = baris("PERSEDIAANAWAL")
Latihan26B36109046.AmbilData()
End Sub
End Class
Public Class Latihan26B36109046
BalasHapusDim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim juzttryboo As New DataTable
Dim juzttryboo2 As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
juzttryboo2 = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA,(DETAILTRANSAKSI.UNIT * DETAILTRANSAKSI.HARGA)as Jumlah from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109046.Text & "'", conect)
juzttryboo2.Fill(juzttryboo)
Dim tu, total As Integer
For Each x As DataRow In juzttryboo.Rows
tu = tu + x("UNIT")
total = total + x("HARGA")
Next
TextBox5.Text = tu
TextBox6.Text = total
End Sub
Private Sub latihan26B3619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DataGridView1.DataSource = juzttryboo
End Sub
End Class
Public Class Latihan024A36109033
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tiwi As New DataTable
Dim baris As DataRow
Private Sub Latihan024A36109033_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cobacoba As New OleDb.OleDbDataAdapter
cobacoba = New OleDb.OleDbDataAdapter("select * from BARANG", CONECT)
cobacoba.Fill(tiwi)
DataGridView1.DataSource = tiwi
End Sub
Private Sub button36109033_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button36109033.Click
If LATIHAN024B36109033.Visible = False Then
LATIHAN024B36109033.Show()
Else
LATIHAN024B36109033.Activate()
End If
baris = tiwi.DefaultView(BindingContext(tiwi).Position).Row
LATIHAN024B36109033.TextBox136109033.Text = baris("KODEBARANG")
LATIHAN024B36109033.TextBox236109033.Text = baris("NAMABARANG")
LATIHAN024B36109033.TextBox336109033.Text = baris("HARGAJUAL")
LATIHAN024B36109033.TextBox436109033.Text = baris("PERSEDIAANAWAL")
LATIHAN024B36109033.AmbilData()
End Sub
End Class
Public Class LATIHAN024B36109033
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim testessaja As New DataTable
Dim cobacoba As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
cobacoba = New OleDb.OleDbDataAdapter("select * from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109033.Text & "'", CONECT)
cobacoba.Fill(testessaja)
End Sub
Private Sub LATIHAN024B36109033_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DataGridView1.DataSource = testessaja
End Sub
End Class
Public Class LATIHAN025A36109033
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tiwi As New DataTable
Dim baris As DataRow
Dim cobacoba As New OleDb.OleDbDataAdapter
Private Sub LATIHAN025A36109033_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
cobacoba = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang ", CONECT)
cobacoba.Fill(tiwi)
DataGridView1.DataSource = tiwi
End Sub
Private Sub Button36109033_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button36109033.Click
If LATIHAN025B36109033.Visible = False Then
LATIHAN025B36109033.Show()
Else
LATIHAN025B36109033.Activate()
End If
baris = tiwi.DefaultView(BindingContext(tiwi).Position).Row
LATIHAN025B36109033.TextBox136109033.Text = baris("KODEBARANG")
LATIHAN025B36109033.TextBox236109033.Text = baris("NAMABARANG")
LATIHAN025B36109033.TextBox336109033.Text = baris("HARGAJUAL")
LATIHAN025B36109033.TextBox436109033.Text = baris("PERSEDIAANAWAL")
LATIHAN025B36109033.AmbilData()
End Sub
End Class
Public Class LATIHAN025B36109033
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim testessaja As New DataTable
Dim cobacoba As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
cobacoba = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109033.Text & "'", CONECT)
cobacoba.Fill(testessaja)
End Sub
Private Sub LATIHAN025B36109033_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DataGridView1.DataSource = testessaja
End Sub
End Class
Public Class LATIHAN026A36109033
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tiwi As New DataTable
Dim baris As DataRow
Dim cobacoba As New OleDb.OleDbDataAdapter
Private Sub LATIHAN026A012_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
cobacoba = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang", CONECT)
cobacoba.Fill(tiwi)
DataGridView1.DataSource = tiwi
End Sub
Private Sub button136109033_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109033.Click
If LATIHAN026B36109033.Visible = False Then
LATIHAN026B36109033.Show()
Else
LATIHAN026B36109033.Activate()
End If
baris = tiwi.DefaultView(BindingContext(tiwi).Position).Row
LATIHAN026B36109033.TextBox136109033.Text = baris("KODEBARANG")
LATIHAN026B36109033.TextBox236109033.Text = baris("NAMABARANG")
LATIHAN026B36109033.TextBox336109033.Text = baris("HARGAJUAL")
LATIHAN026B36109033.TextBox436109033.Text = baris("PERSEDIAANAWAL")
LATIHAN026B36109033.AmbilData()
End Sub
End Class
Public Class LATIHAN026B36109033
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim testessaja As New DataTable
Dim cobacoba As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
cobacoba = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA,(DETAILTRANSAKSI.UNIT * DETAILTRANSAKSI.HARGA)as Jumlah from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109033.Text & "'", CONECT)
cobacoba.Fill(testessaja)
Dim tu, total As Integer
For Each x As DataRow In testessaja.Rows
tu = tu + x("UNIT")
total = total + x("HARGA")
Next
TextBox5.Text = tu
TextBox6.Text = total
End Sub
Private Sub LATIHAN026B012_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DataGridView1.DataSource = testessaja
End Sub
End Class
Public Class LATIHAN01536109032
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Esthi As New DataTable
Dim Adapter As OleDb.OleDbDataAdapter
Private Sub LATIHAN01536109032_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Adapter = New OleDb.OleDbDataAdapter("select * from barang", CONECT)
Adapter.Fill(Esthi)
DataGridView136109032.DataSource = Esthi
End Sub
End Class
Public Class LATIHAN01636109032
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Esthi As New DataTable
Private Sub LATIHAN01636109032_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Adapter As OleDb.OleDbDataAdapter
Adapter = New OleDb.OleDbDataAdapter("select * from mastertransaksi", CONECT)
Adapter.Fill(Esthi)
DataGridView236109032.DataSource = Esthi
End Sub
End Class
Public Class LATIHAN01736109032
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Esthi As New DataTable
Private Sub LATIHAN01736109032_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Adapter As OleDb.OleDbDataAdapter
Adapter = New OleDb.OleDbDataAdapter("select * from detailtransaksi", CONECT)
Adapter.Fill(Esthi)
DataGridView336109032.DataSource = Esthi
End Sub
End Class
Public Class LATIHAN01836109032
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Esthi As New DataTable
Private Sub LATIHAN01836109032_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Adapter As OleDb.OleDbDataAdapter
Adapter = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang", CONECT)
Adapter.Fill(Esthi)
DataGridView436109032.DataSource = Esthi
End Sub
End Class
Public Class LATIHAN01936109032
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Esthi As New DataTable
Private Sub LATIHAN01936109032_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Adapter As OleDb.OleDbDataAdapter
Adapter = 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", CONECT)
Adapter.Fill(Esthi)
DataGridView536109032.DataSource = Esthi
End Sub
End Class
Public Class LATIHAN02036109032
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Esthi As New DataTable
Private Sub LATIHAN02036109032_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Adapter As OleDb.OleDbDataAdapter
Adapter = 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", CONECT)
Adapter.Fill(Esthi)
DataGridView636109032.DataSource = Esthi
End Sub
End Class
Public Class LATIHAN023A36109032
BalasHapusDim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim mirasthi As New DataTable
Dim baris As DataRow
Private Sub LATIHAN023A36109032_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim lanjutkan As New OleDb.OleDbDataAdapter
lanjutkan = New OleDb.OleDbDataAdapter("select * from MASTERTRANSAKSI", connect)
lanjutkan.Fill(mirasthi)
DataGridView1.DataSource = mirasthi
End Sub
Private Sub Button136109032_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109032.Click
If LATIHAN023B36109032.Visible = False Then
LATIHAN023B36109032.Show()
Else
LATIHAN023B36109032.Activate()
End If
baris = mirasthi.DefaultView(BindingContext(mirasthi).Position).Row
LATIHAN023B36109032.TextBox136109032.Text = baris("notrans")
LATIHAN023B36109032.TextBox236109032.Text = baris("jenistransaksi")
LATIHAN023B36109032.Date136109032.Value = baris("tanggaltransaksi")
LATIHAN023B36109032.AmbilData()
End Sub
End Class
Public Class LATIHAN023B36109032
Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim lanjut As New DataTable
Dim lanjutkan As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
lanjutkan = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where NOTRANS ='" & TextBox136109032.Text & "'", connect)
lanjutkan.Fill(lanjut)
End Sub
Private Sub LATIHAN023B36109032_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DataGridView136109032.DataSource = lanjut
End Sub
End Class
Public Class Latihan024A36109032
BalasHapusDim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim mirasthi As New DataTable
Dim baris As DataRow
Private Sub Latihan024A36109032_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim lanjutkan As New OleDb.OleDbDataAdapter
lanjutkan = New OleDb.OleDbDataAdapter("select * from BARANG", connect)
lanjutkan.Fill(mirasthi)
DataGridView136109032.DataSource = mirasthi
End Sub
Private Sub Button136109032_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109032.Click
If LATIHAN024B36109032.Visible = False Then
LATIHAN024B36109032.Show()
Else
LATIHAN024B36109032.Activate()
End If
baris = mirasthi.DefaultView(BindingContext(mirasthi).Position).Row
LATIHAN024B36109032.TextBox136109032.Text = baris("KODEBARANG")
LATIHAN024B36109032.TextBox236109032.Text = baris("NAMABARANG")
LATIHAN024B36109032.TextBox336109032.Text = baris("HARGAJUAL")
LATIHAN024B36109032.TextBox436109032.Text = baris("PERSEDIAANAWAL")
LATIHAN024B36109032.AmbilData()
End Sub
End Class
Public Class LATIHAN024B36109032
Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim lanjut As New DataTable
Dim lanjutkan As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
lanjutkan = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109032.Text & "'", connect)
lanjutkan.Fill(lanjut)
End Sub
Private Sub LATIHAN024B36109032_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DataGridView136109032.DataSource = lanjut
End Sub
End Class
Public Class LATIHAN025A36109032
BalasHapusDim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim mirasthi As New DataTable
Dim baris As DataRow
Dim lanjutkan As New OleDb.OleDbDataAdapter
Private Sub LATIHAN025A36109032_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
lanjutkan = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang ", connect)
lanjutkan.Fill(mirasthi)
DataGridView136109032.DataSource = mirasthi
End Sub
Private Sub Button136109032_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109032.Click
If LATIHAN025B36109032.Visible = False Then
LATIHAN025B36109032.Show()
Else
LATIHAN025B36109032.Activate()
End If
baris = mirasthi.DefaultView(BindingContext(mirasthi).Position).Row
LATIHAN025B36109032.TextBox136109032.Text = baris("KODEBARANG")
LATIHAN025B36109032.TextBox236109032.Text = baris("NAMABARANG")
LATIHAN025B36109032.TextBox336109032.Text = baris("HARGAJUAL")
LATIHAN025B36109032.TextBox436109032.Text = baris("PERSEDIAANAWAL")
LATIHAN025B36109032.AmbilData()
End Sub
End Class
Public Class LATIHAN025B36109032
Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim lanjut As New DataTable
Dim lanjutkan As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
lanjutkan = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA,(DETAILTRANSAKSI.UNIT * DETAILTRANSAKSI.HARGA)as Jumlah from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109032.Text & "'", connect)
lanjutkan.Fill(lanjut)
End Sub
Private Sub LATIHAN025B36109032_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DataGridView136109032.DataSource = lanjut
End Sub
End Class
Public Class LATIHAN026A36109032
BalasHapusDim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim mirasthi As New DataTable
Dim baris As DataRow
Dim lanjutkan As New OleDb.OleDbDataAdapter
Private Sub LATIHAN026A36109032_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
lanjutkan = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang", connect)
lanjutkan.Fill(mirasthi)
DataGridView136109032.DataSource = mirasthi
End Sub
Private Sub Button136109032_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109032.Click
If LATIHAN026B36109032.Visible = False Then
LATIHAN026B36109032.Show()
Else
LATIHAN026B36109032.Activate()
End If
baris = mirasthi.DefaultView(BindingContext(mirasthi).Position).Row
LATIHAN026B36109032.TextBox136109032.Text = baris("KODEBARANG")
LATIHAN026B36109032.TextBox236109032.Text = baris("NAMABARANG")
LATIHAN026B36109032.TextBox336109032.Text = baris("HARGAJUAL")
LATIHAN026B36109032.TextBox436109032.Text = baris("PERSEDIAANAWAL")
LATIHAN026B36109032.AmbilData()
End Sub
End Class
Public Class LATIHAN026B36109032
Dim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim lanjut As New DataTable
Dim lanjutkan As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
lanjutkan = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA,(DETAILTRANSAKSI.UNIT * DETAILTRANSAKSI.HARGA)as Jumlah from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109032.Text & "'", connect)
lanjutkan.Fill(lanjut)
Dim tu, total As Integer
For Each x As DataRow In lanjut.Rows
tu = tu + x("UNIT")
total = total + x("jumlah")
Next
TextBox536109032.Text = tu
TextBox636109032.Text = total
End Sub
Private Sub LATIHAN026B36109032_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DataGridView136109032.DataSource = lanjut
End Sub
End Class
Public Class LATIHAN02136109032
BalasHapusDim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim mirasthi As New DataTable
Dim mirasthisodara As New DataTable
Dim datset As New DataSet
Dim bin As New BindingSource
Dim bin2 As New BindingSource
Private Sub LATIHAN02136109032_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim lanjut As New OleDb.OleDbDataAdapter
Dim lanjutkan As New OleDb.OleDbDataAdapter
lanjut = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", connect)
lanjut.Fill(mirasthi)
lanjutkan = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", connect)
lanjutkan.Fill(mirasthisodara)
mirasthi.TableName = "bosnya"
mirasthisodara.TableName = "sodaranya"
datset.Tables.Add(mirasthi)
datset.Tables.Add(mirasthisodara)
datset.Relations.Add(New DataRelation("lanjut", datset.Tables("bosnya").Columns("NoTrans"), datset.Tables("sodaranya").Columns("NoTrans")))
bin.DataSource = datset
bin.DataMember = "bosnya"
bin2.DataSource = bin
bin2.DataMember = "lanjut"
DataGridView136109032.DataSource = bin
DataGridView236109032.DataSource = bin2
End Sub
End Class
Public Class LATIHAN02236109032
BalasHapusDim connect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim mirasthi As New DataTable
Dim mirasthisodara As New DataTable
Dim datset As New DataSet
Dim bin As New BindingSource
Dim bin2 As New BindingSource
Private Sub LATIHAN02236109032_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim lanjut As New OleDb.OleDbDataAdapter
Dim lanjutkan As New OleDb.OleDbDataAdapter
lanjut = New OleDb.OleDbDataAdapter("select * from BARANG ", connect)
lanjut.Fill(mirasthi)
lanjutkan = New OleDb.OleDbDataAdapter("select detailtransaksi.notrans, detailtransaksi.harga, detailtransaksi.unit, 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", connect)
lanjutkan.Fill(mirasthisodara)
mirasthi.TableName = "bosnya"
mirasthisodara.TableName = "sodaranya"
datset.Tables.Add(mirasthi)
datset.Tables.Add(mirasthisodara)
datset.Relations.Add(New DataRelation("lanjut", datset.Tables("bosnya").Columns("KodeBarang"), datset.Tables("sodaranya").Columns("KodeBarang")))
bin.DataSource = datset
bin.DataMember = "bosnya"
bin2.DataSource = bin
bin2.DataMember = "lanjut"
DataGridView1.DataSource = bin
DataGridView2.DataSource = bin2
End Sub
End Class
Public Class Lat1536109042
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim adapter As OleDb.OleDbDataAdapter
Dim Muhammad As New DataTable
Private Sub Lat15_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
adapter = New OleDb.OleDbDataAdapter("select * from barang", CONECT)
adapter.Fill(Muhammad)
DataGridView136109042.DataSource = Muhammad
End Sub
End Class
Public Class Lat1636109042
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim adapter As OleDb.OleDbDataAdapter
Dim Muhammad As New DataTable
Private Sub LATIHAN016012_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
adapter = New OleDb.OleDbDataAdapter("select * from mastertransaksi", conect)
adapter.Fill(Muhammad)
DataGridView136109042.DataSource = Muhammad
End Sub
End Class
Public Class Lat1736109042
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim adapter As OleDb.OleDbDataAdapter
Dim Muhammad As New DataTable
Private Sub LATIHAN017012_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
adapter = New OleDb.OleDbDataAdapter("select * from detailtransaksi", conect)
adapter.Fill(Muhammad)
DataGridView136109042.DataSource = Muhammad
End Sub
End Class
Public Class Lat1836109042
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim adapter As OleDb.OleDbDataAdapter
Dim Muhammad As New DataTable
Private Sub lat18_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
adapter = New OleDb.OleDbDataAdapter("select * from barang", conect)
adapter.Fill(Muhammad)
DataGridView1.DataSource = Muhammad
End Sub
End Class
Public Class lat1936109042
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim muhammad As New DataTable
Private Sub latihan193619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ijal As New OleDb.OleDbDataAdapter
ijal = 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 ", conect)
ijal.Fill(muhammad)
DataGridView136109042.DataSource = muhammad
End Sub
End Class
Public Class Lat2036109042
BalasHapusDim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim ijal As New DataTable
Private Sub latihan2036109043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim muhammad As New OleDb.OleDbDataAdapter
muhammad = 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 ", conect)
muhammad.Fill(ijal)
DataGridView136109042.DataSource = ijal
End Sub
End Class
Public Class Lat2136109042
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim ijal As New DataTable
Dim anakijal As New DataTable
Dim datset As New DataSet
Dim bind As New BindingSource
Dim bind2 As New BindingSource
Private Sub latihan213619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim coba As New OleDb.OleDbDataAdapter
Dim coba2 As New OleDb.OleDbDataAdapter
coba = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", conect)
coba.Fill(ijal)
coba2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi ", conect)
coba2.Fill(anakijal)
ijal.TableName = "induknya"
anakijal.TableName = "anaknya"
datset.Tables.Add(ijal)
datset.Tables.Add(anakijal)
datset.Relations.Add(New DataRelation("coba", datset.Tables("induknya").Columns("NOTRANS"), datset.Tables("anaknya").Columns("NOTRANS")))
bind.DataSource = datset
bind.DataMember = "induknya"
bind2.DataSource = bind
bind2.DataMember = "coba"
DataGridView136109042.DataSource = bind
DataGridView236109042.DataSource = bind2
End Sub
End Class
Komentar ini telah dihapus oleh pengarang.
BalasHapusKomentar ini telah dihapus oleh pengarang.
BalasHapusPublic Class Lat2236109042
BalasHapusDim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim ijal As New DataTable
Dim anakijal As New DataTable
Dim datset As New DataSet
Dim bind As New BindingSource
Dim bind2 As New BindingSource
Private Sub latihan223619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim coba As New OleDb.OleDbDataAdapter
Dim coba2 As New OleDb.OleDbDataAdapter
coba = New OleDb.OleDbDataAdapter("select * from BARANG ", conect)
coba.Fill(ijal)
coba2 = New OleDb.OleDbDataAdapter("select detailtransaksi.notrans, detailtransaksi.harga, detailtransaksi.unit, 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", conect)
coba2.Fill(anakijal)
ijal.TableName = "induknya"
anakijal.TableName = "anaknya"
datset.Tables.Add(ijal)
datset.Tables.Add(anakijal)
datset.Relations.Add(New DataRelation("coba", datset.Tables("induknya").Columns("KODEBARANG"), datset.Tables("anaknya").Columns("KODEBARANG")))
bind.DataSource = datset
bind.DataMember = "induknya"
bind2.DataSource = bind
bind2.DataMember = "coba"
DataGridView136109042.DataSource = bind
DataGridView236109042.DataSource = bind2
End Sub
End Class
Public Class Lat25A36109042
BalasHapusDim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim ijal As New DataTable
Dim line As DataRow
Dim coba As New OleDb.OleDbDataAdapter
Private Sub latihan25A3619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
coba = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang ", conect)
coba.Fill(ijal)
DGV36109042.DataSource = ijal
End Sub
Private Sub butoon2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109042.Click
If Lat25b36109042.Visible = False Then
Lat25b36109042.Show()
Else
Lat25b36109042.Activate()
End If
line = ijal.DefaultView(BindingContext(ijal).Position).Row
Lat25b36109042.TextBox136109042.Text = line("KODEBARANG")
Lat25b36109042.TextBox236109042.Text = line("NAMABARANG")
Lat25b36109042.TextBox336109042.Text = line("HARGAJUAL")
Lat25b36109042.TextBox436109042.Text = line("PERSEDIAANAWAL")
Lat25b36109042.AmbilData()
End Sub
End Class
Public Class Lat25b36109042
Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim coba As New DataTable
Dim cobacoba As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
cobacoba = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.ID,DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA,(DETAILTRANSAKSI.UNIT * DETAILTRANSAKSI.HARGA)as Jumlah from DETAILTRANSAKSI where KODEBARANG ='" & TextBox136109042.Text & "'", conect)
cobacoba.Fill(coba)
End Sub
Private Sub latihan25B3619043_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
DataGridView136109042.DataSource = coba
End Sub
End Class
Public Class Lat26A36109042
BalasHapusDim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim ijal As New DataTable
Dim line As DataRow
Dim coba As New OleDb.OleDbDataAdapter
Private Sub latihan26A3619042_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
coba = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga,(detailtransaksi.unit*detailtransaksi.harga)as jumlah, barang.kodebarang, barang.namabarang,barang.hargajual,barang.persediaanawal from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang", conect)
coba.Fill(ijal)
DataGridView136109042.DataSource = ijal
End Sub
Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109042.Click
If Lat26B36109042.Visible = False Then
Lat26B36109042.Show()
Else
Lat26B36109042.Activate()
End If
line = ijal.DefaultView(BindingContext(ijal).Position).Row
Lat26B36109042.TextBox136109042.Text = line("KODEBARANG")
Lat26B36109042.TextBox236109042.Text = line("NAMABARANG")
Lat26B36109042.TextBox336109042.Text = line("HARGAJUAL")
Lat26B36109042.TextBox436109042.Text = line("PERSEDIAANAWAL")
Lat26B36109042.AmbilData()
End Sub
End Class
Public Class latihan15035
BalasHapusDim pasokan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source= C:\users\andihabibi\My Documents\latihan 15-26 mengakses data on 10.0.7.1\DataTransaksiJualBeli.accdb")
Dim Bakpenampung As New DataTable
Private Sub Latihan015035_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim X As New OleDb.OleDbDataAdapter
X = New OleDb.OleDbDataAdapter("select* from BARANG", pasokan)
X.Fill(Bakpenampung)
X.Dispose()
DataGridView1035.DataSource = Bakpenampung
End Sub
End Class
Public Class latihan16035
Dim pasokan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source= C:\users\andihabibi\My Documents\latihan 15-26 mengakses data on 10.0.7.1\DataTransaksiJualBeli.accdb")
Dim Bakpenampung As New DataTable
Private Sub Latihan16035_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim X As New OleDb.OleDbDataAdapter
X = New OleDb.OleDbDataAdapter("select* from MASTERTRANSAKSI", pasokan)
X.Fill(Bakpenampung)
X.Dispose()
DataGridView1035.DataSource = Bakpenampung
End Sub
End Class
Public Class latihan17035
Dim pasokan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source= C:\users\andihabibi\My Documents\latihan 15-26 mengakses data on 10.0.7.1\DataTransaksiJualBeli.accdb")
Dim Bakpenampung As New DataTable
Private Sub Latihan17035_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim X As New OleDb.OleDbDataAdapter
X = New OleDb.OleDbDataAdapter("select* from DETAILTRANSAKSI", pasokan)
X.Fill(Bakpenampung)
X.Dispose()
DataGridView1035.DataSource = Bakpenampung
End Sub
End Class
Public Class latihan18035
Dim pasokan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source= C:\users\andihabibi\My Documents\latihan 15-26 mengakses data on 10.0.7.1\DataTransaksiJualBeli.accdb")
Dim Bakpenampung As New DataTable
Private Sub Latihan18035_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim X As New OleDb.OleDbDataAdapter
X = New OleDb.OleDbDataAdapter("select BARANG.KODEBARANG, BARANG.NAMABARANG, DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA from BARANG inner join DETAILTRANSAKSI on BARANG.KODEBARANG=DETAILTRANSAKSI.KODEBARANG", pasokan)
X.Fill(Bakpenampung)
X.Dispose()
DataGridView1035.DataSource = Bakpenampung
End Sub
End Class
Public Class Latihan_1536109055
BalasHapusDim connect As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim falah As New DataTable
Private Sub Latihan_15361090552_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select * from barang", connect)
adapter.Fill(falah)
dgv36109055.DataSource = falah
End Sub
End Class
Public Class Latihan_1636109055
Dim connect As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim falah As New DataTable
Private Sub Latihan_16361090552_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select * from mastertransaksi", connect)
adapter.Fill(falah)
dgv36109055.DataSource = falah
End Sub
End Class
Public Class Latihan_1736109055
Dim connect As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim falah As New DataTable
Private Sub Latihan_1736109055_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select * from detailtransaksi", connect)
adapter.Fill(falah)
dgv36109055.DataSource = falah
End Sub
End Class
Public Class Latihan_1836109055
Dim connect As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim falah As New DataTable
Private Sub Latihan_1836109055_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang", connect)
adapter.Fill(falah)
dgv36109055.DataSource = falah
End Sub
End Class
Public Class LATIHAN1836109030
BalasHapusDim conect As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim sanie As New DataTable
Private Sub LATIHAN1836109030_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang", conect)
adapter.Fill(sanie)
dgv36109030.DataSource = sanie
End Sub
End Class
Public Class LATIHAN1936109030
Dim conect As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim sanie As New DataTable
Private Sub LATIHAN1936109030_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = 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", conect)
adapter.Fill(sanie)
dgv36109030.DataSource = sanie
End Sub
End Class
Public Class LATIHAN2036109030
Dim conect As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim sanie As New DataTable
Private Sub LATIHAN2036109030_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As OleDb.OleDbDataAdapter
adapter = 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", conect)
adapter.Fill(sanie)
dgv36109030.DataSource = sanie
End Sub
End Class
Public Class LATIHAN2236109030
BalasHapusDim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim sanie As New DataTable
Dim sanieanak As New DataTable
Dim datset As New DataSet
Dim bin As New BindingSource
Dim bin2 As New BindingSource
Private Sub LATIHAN2236109030_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim tes As New OleDb.OleDbDataAdapter
Dim tes2 As New OleDb.OleDbDataAdapter
tes = New OleDb.OleDbDataAdapter("select * from BARANG ", conect)
tes.Fill(sanie)
tes2 = New OleDb.OleDbDataAdapter("select detailtransaksi.notrans, detailtransaksi.harga, detailtransaksi.unit, 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", conect)
tes2.Fill(sanieanak)
sanie.TableName = "induknya"
sanieanak.TableName = "anaknya"
datset.Tables.Add(sanie)
datset.Tables.Add(sanieanak)
datset.Relations.Add(New DataRelation("tes", datset.Tables("induknya").Columns("KODEBARANG"), datset.Tables("anaknya").Columns("KODEBARANG")))
bin.DataSource = datset
bin.DataMember = "induknya"
bin2.DataSource = bin
bin2.DataMember = "tes"
dgv136109030.DataSource = bin
dgv236109030.DataSource = bin2
End Sub
End Class
tmn2..ternyata posting komentar berkali-kali dlm satu waktu menyebabkan akun email kita terblokir karena dianggap spam oleh provider..
BalasHapusPublic Class latihan1536109039
BalasHapusDim pasokan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source= C:\users\musdalifah\My Documents\latihan 15-26 mengakses data on 10.0.7.1\DataTransaksiJualBeli.accdb")
Dim Ifha As New DataTable
Private Sub latihan1536109039_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim X As New OleDb.OleDbDataAdapter
X = New OleDb.OleDbDataAdapter("select* from BARANG", pasokan)
X.Fill(Ifha)
X.Dispose()
DataGridView136109039.DataSource = Ifha
End Sub
End Class
Public Class latihan1636109039
Dim pasokan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source= C:\users\musdalifah\My Documents\latihan 15-26 mengakses data on 10.0.7.1\DataTransaksiJualBeli.accdb")
Dim Ifha As New DataTable
Private Sub Latihan1636109039_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim X As New OleDb.OleDbDataAdapter
X = New OleDb.OleDbDataAdapter("select* from MASTERTRANSAKSI", pasokan)
X.Fill(Ifha)
X.Dispose()
DataGridView136109039.DataSource = Ifha
End Sub
End Class
Public Class latihan1736109039
Dim pasokan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source= C:\users\musdalifah\My Documents\latihan 15-26 mengakses data on 10.0.7.1\DataTransaksiJualBeli.accdb")
Dim Bakpenampung As New DataTable
Private Sub Latihan1736109039_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim X As New OleDb.OleDbDataAdapter
X = New OleDb.OleDbDataAdapter("select* from DETAILTRANSAKSI", pasokan)
X.Fill(Ifha)
X.Dispose()
DataGridView136109039.DataSource = Ifha
End Sub
End Class