Dim ridha As New DataTable Dim risa As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Public Sub uly(ByVal A As String) Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select id, notrans, unit, harga from DETAILTRANSAKSI where KODEBARANG ='" & A & "'", risa) ridha.Rows.Clear() adapter.Fill(ridha)
dgv_36109015.DataSource = ridha End Sub End Class
- TUGAS 25A
Public Class Form25A_36109015
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim ak As New DataTable
Private Sub btn_36109015_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_36109015.Click If Form25B_36109015.Visible = False Then Form25B_36109015.Show() Else Form25B_36109015.Activate() End If
Private Sub Form25A_36109015_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim risa As New OleDb.OleDbDataAdapter risa = New OleDb.OleDbDataAdapter("select * from BARANG", CONECT) risa.Fill(ak) risa.Dispose() dgv_36109015.DataSource = ak End Sub End Class
- TUGAS 25B
Public Class Form25B_36109015
Dim ridha As New DataTable Dim risa As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Public Sub uly(ByVal A As String) Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select id, notrans, unit, harga from DETAILTRANSAKSI where KODEBARANG ='" & A & "'", risa) ridha.Rows.Clear() adapter.Fill(ridha)
dgv2_36109015.DataSource = ridha End Sub
Private Sub Form25B_36109015_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim ak As New DataTable
Private Sub Form26A_36109015_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim risa As New OleDb.OleDbDataAdapter risa = New OleDb.OleDbDataAdapter("select * from BARANG", CONECT) risa.Fill(ak) risa.Dispose() dgv1_36109015.DataSource = ak
End Sub
Private Sub btn_36109015_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_36109015.Click If Form26B_36109015.Visible = False Then Form26B_36109015.Show() Else Form26B_36109015.Activate() End If
Form26B_36109015.uly(Form26B_36109015.kb_36109015.Text) End Sub End Class
- TUGAS 26B
Public Class Form26B_36109015 Dim ridha As New DataTable Dim risa As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Public Sub uly(ByVal A As String) Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("SELECT MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, MASTERTRANSAKSI.KETERANGAN, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, [DETAILTRANSAKSI]![UNIT]*[DETAILTRANSAKSI]![HARGA] AS jumlah FROM DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS = MASTERTRANSAKSI.NOTRANS where KODEBARANG ='" & A & "'", risa) ridha.Rows.Clear() adapter.Fill(ridha) adapter.Dispose()
dgv2_36109015.DataSource = ridha
Dim tu, total As Integer For Each x As DataRow In ridha.Rows tu = tu + x("unit") total = total + x("jumlah") Next tu_36109015.Text = tu tj_36109015.Text = total End Sub End Class
Latihan 23 Public Class Form23A Dim febri As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tabel As New DataTable
Private Sub Form23A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim riri As New OleDb.OleDbDataAdapter riri = New OleDb.OleDbDataAdapter("select*from mastertransaksi", febri) tabel.Rows.Clear() riri.Fill(tabel) riri.Dispose()
dgv36109007.DataSource = tabel
End Sub
Private Sub btn36109007_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn36109007.Click If Form23B.Visible = False Then Form23B.Show() Else Form23B.Activate() End If
End Class Public Class Form23B Dim febri As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim riri As New DataTable
Public Sub jawa(ByVal A As String) Dim surya As New OleDb.OleDbDataAdapter surya = New OleDb.OleDbDataAdapter("select*from detailtransaksi where notrans='" & A & "'", febri) riri.Rows.Clear() surya.Fill(riri)
dgv361090071.DataSource = riri
End Sub
Private Sub Form23B_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Public Class Form24A Dim febri As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tabel As New DataTable Latihan 24 Private Sub Form24A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim riri As New OleDb.OleDbDataAdapter riri = New OleDb.OleDbDataAdapter("select *from barang", febri) tabel.Rows.Clear() riri.Fill(tabel) riri.Dispose()
dgv36109007.DataSource = tabel
End Sub
Private Sub btn36109007_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn36109007.Click If Form24B.Visible = False Then Form24B.Show() Else Form24B.Activate() End If
End Sub End Class Public Class Form24B Dim febri As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim riri As New DataTable
Public Sub jawa(ByVal A As String) Dim surya As New OleDb.OleDbDataAdapter surya = New OleDb.OleDbDataAdapter("select*from detailtransaksi where kodebarang='" & A & "'", febri) riri.Rows.Clear() surya.Fill(riri)
dgv36109007.DataSource = riri
End Sub
Private Sub Form24B_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Public Class Form25A Dim febri As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tabel As New DataTable Latihan 25 Private Sub Form25A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim riri As New OleDb.OleDbDataAdapter riri = New OleDb.OleDbDataAdapter("select *from barang", febri) tabel.Rows.Clear() riri.Fill(tabel) riri.Dispose()
dgv36109007.DataSource = tabel
End Sub
Private Sub btn36109007_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn36109007.Click If Form25B.Visible = False Then Form25B.Show() Else Form25B.Activate() End If
End Sub End Class Public Class Form25B Dim febri As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim riri As New DataTable
Public Sub jawa(ByVal A As String) Dim surya As New OleDb.OleDbDataAdapter surya = New OleDb.OleDbDataAdapter("select * from Query5", febri) riri.Rows.Clear() surya.Fill(riri)
dgv36109007.DataSource = riri
End Sub
Private Sub Form25B_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Public NotInheritable Class form24b_36109003 Dim anto As New DataTable Dim ndut As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Public Sub uly(ByVal A As String) Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select id, notrans, unit, harga from DETAILTRANSAKSI where KODEBARANG ='" & A & "'", ndut) anto.Rows.Clear() adapter.Fill(anto)
dgv2_36109003.DataSource = anto End Sub Private Sub form24b_36109003_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Public NotInheritable Class form25b_36109003 Dim anto As New DataTable Dim ndut As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Public Sub uly(ByVal A As String) Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select notrans, tanggaltransaksi, jenistransaksi, keterangan, unit, harga, jumlah from Query5 where KODEBARANG ='" & A & "'", ndut) anto.Rows.Clear() adapter.Fill(anto)
dgv2_36109003.DataSource = anto End Sub Private Sub form25b_36109003_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Public NotInheritable Class form26a_36109003 Dim anto As New DataTable Dim ndut As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Private Sub form26a_36109003_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim soe As New OleDb.OleDbDataAdapter soe = New OleDb.OleDbDataAdapter("select * from BARANG", ndut) soe.Fill(anto) soe.Dispose() dgv1_36109003.DataSource = anto End Sub Private Sub klik_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles klik.Click If form26b_36109003.Visible = False Then form26b_36109003.Show() Else form26b_36109003.Activate() End If
Public NotInheritable Class form26b_36109003 Dim anto As New DataTable Dim ndut As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Public Sub uly(ByVal A As String) Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select notrans, tanggaltransaksi, jenistransaksi, keterangan, unit, harga, jumlah from Query5 where KODEBARANG ='" & A & "'", ndut) anto.Rows.Clear() adapter.Fill(anto)
dgv2_36109003.DataSource = anto End Sub Private Sub form26b_36109003_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub dgv2_36109003_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgv2_36109003.CellContentClick Dim tu, total As Integer For Each x As DataRow In anto.Rows tu = tu + x("unit") total = total + x("jumlah") Next totunit_36109003.Text = tu totjum_36109003.Text = total End Sub End Class
Public Class Form23A Dim rusna_DT As New DataTable Dim Ningsi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Private Sub Form23A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim a As New OleDb.OleDbDataAdapter a = New OleDb.OleDbDataAdapter("select * from MASTERTRANSAKSI", Ningsi) a.Fill(rusna_DT) a.Dispose() dgv_36109010.DataSource = rusna_DT End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Form23B.Visible = False Then Form23B.Show() Else Form23B.Activate() End If
Form23B.uly(Form23B.nr_36109010.Text) End Sub End Class
--------------------------------------------- Public Class Form23B Dim rusna_DT As New DataTable Dim Ningsi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Public Sub uly(ByVal A As String) Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select id, kodebarang, unit, harga from DETAILTRANSAKSI where NOTRANS='" & A & "'", Ningsi) rusna_DT.Rows.Clear() adapter.Fill(rusna_DT)
dgv_36109010.DataSource = rusna_DT End Sub Private Sub Form23B_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub dgv_36109010_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgv_36109010.CellContentClick
Public Class Form24A Dim rusna_DT As New DataTable Dim Ningsi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Private Sub Form24A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim a As New OleDb.OleDbDataAdapter a = New OleDb.OleDbDataAdapter("select * from BARANG", Ningsi) a.Fill(rusna_DT) a.Dispose() dgv_36109010.DataSource = rusna_DT End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Form24B.Visible = False Then Form24B.Show() Else Form24B.Activate() End If
Form24B.uly(Form24B.kb_36109010.Text) End Sub End Class
----------------------------------------------
Public Class Form24B Dim rusna As New DataTable Dim virgo As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'") Public Sub uly(ByVal A As String) Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select id, notrans, unit, harga from DETAILTRANSAKSI where KODEBARANG ='" & A & "'", virgo) rusna.Rows.Clear() adapter.Fill(rusna)
dgv_36109010.DataSource = rusna End Sub Private Sub Form24B_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Public Class Form23 Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tabel As New DataTable Private Sub Form23_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select*from mastertransaksi", koneksi) tabel.Rows.Clear() adapter.Fill(tabel) adapter.Dispose()
DataGridView1.DataSource = tabel End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Form23b.Visible = False Then Form23b.Show() Else : Form23b.Activate() End If
Form23b.apreal(Form23b.textbox1.Text) End Sub End Class
Public Class Form23b Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tabel As New DataTable
Public Sub apreal(ByVal A As String) Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select*from detailtransaksi where notrans='" & A & "'", koneksi) tabel.Rows.Clear() adapter.Fill(tabel)
DataGridView1.DataSource = tabel
End Sub
Private Sub Form23b_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Public Class Form23A Dim TETEN As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim NONN As New DataTable
Private Sub Form23A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select* from mastertransaksi", TETEN) NONN.Rows.Clear() adapter.Fill(NONN) adapter.Dispose()
DGV014.DataSource = NONN
End Sub
Private Sub KLIK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KLIK.Click If Form23B.Visible = False Then Form23B.Show() Else : Form23B.Activate() End If
Public Class Form23B Dim TETEN As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim NONN As New DataTable
Public Sub NONNTEEN(ByVal A As String) Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select*from detailtransaksi where notrans='" & A & "'", TETEN) NONN.Rows.Clear() adapter.Fill(NONN)
Public Class Form24A Dim SOPPENG As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim BONE As New DataTable
Private Sub Form24A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select*from Barang", SOPPENG) BONE.Rows.Clear() adapter.Fill(BONE) adapter.Dispose()
DGV014.DataSource = BONE
End Sub
Private Sub DT014_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DT014.Click If Form24B.Visible = False Then Form24B.Show() Else : Form24B.Activate() End If
Public Class Form24B Dim SOPPENG As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim BONE As New DataTable
Public Sub ATW(ByVal A As String) Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select*from detailtransaksi where KodeBarang='" & A & "'", SOPPENG) BONE.Rows.Clear() adapter.Fill(BONE)
Public Class Form25A Dim SOPPENG As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim BONE As New DataTable
Private Sub Form25A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select*from Barang", SOPPENG) BONE.Rows.Clear() adapter.Fill(BONE) adapter.Dispose()
DGV014.DataSource = BONE
End Sub
Private Sub DT014_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DT014.Click If Form25B.Visible = False Then Form25B.Show() Else : Form25B.Activate() End If
Dim SOPPENG As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim BONE As New DataTable
Public Sub ATWG(ByVal A As String) Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select*from detailtransaksi where KodeBarang='" & A & "'", SOPPENG) BONE.Rows.Clear() adapter.Fill(BONE)
Public Class Form26A Dim rusna_DT As New DataTable Dim Ningsi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Private Sub Form26A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim a As New OleDb.OleDbDataAdapter a = New OleDb.OleDbDataAdapter("select * from BARANG", Ningsi) a.Fill(rusna_DT) a.Dispose() dgv1_36109010.DataSource = rusna_DT End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Form26B.Visible = False Then Form26B.Show() Else Form26B.Activate() End If
Form26B.uly(Form26B.kb_36109010.Text) End Sub End Class --------------------------------------- Public Class Form26B Dim rusna As New DataTable Dim virgo As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Public Sub uly(ByVal A As String) Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select notrans, tanggaltransaksi, jenistransaksi, keterangan, unit, harga, jumlah from Query5 where KODEBARANG ='" & A & "'", virgo) rusna.Rows.Clear() adapter.Fill(rusna)
dgv2_36109010.DataSource = rusna End Sub
Private Sub Form26B_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub dgv2_36109010_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgv2_36109010.CellContentClick Dim tu, total As Integer For Each x As DataRow In rusna.Rows tu = tu + x("unit") total = total + x("jumlah") Next totunit_36109003.Text = tu totjum_36109003.Text = total End Sub End Class
Public Class Form25A Dim rusna As New DataTable Dim virgo As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Private Sub Form25A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim ningsi As New OleDb.OleDbDataAdapter ningsi = New OleDb.OleDbDataAdapter("select * from BARANG", virgo) ningsi.Fill(rusna) ningsi.Dispose() dgv1_36109010.DataSource = rusna End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Form25B.Visible = False Then Form25B.Show() Else Form25B.Activate() End If
Form25B.uly(Form25B.kb_36109010.Text) End Sub End Class ---------------------- Public Class Form25B Dim rusna As New DataTable Dim virgo As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Public Sub uly(ByVal A As String) Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select notrans, tanggaltransaksi, jenistransaksi, keterangan, unit, harga, jumlah from Query5 where KODEBARANG ='" & A & "'", virgo) rusna.Rows.Clear() adapter.Fill(rusna)
dgv2_36109010.DataSource = rusna End Sub End Class
Dim apreal As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim april As New DataTable Private Sub Latihan24A_001_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select*from Barang", apreal) april.Rows.Clear() adapter.Fill(april) adapter.Dispose()
dgv01_001.DataSource = april
End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Form24b.Visible = False Then Form24b.Show() Else : Form24b.Activate() End If
Public Class Form24b Dim apreal As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim april As New DataTable Public Sub uly(ByVal A As String) Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select*from detailtransaksi where KodeBarang='" & A & "'", apreal) april.Rows.Clear() adapter.Fill(april)
DGVB_36109001.DataSource = april
End Sub
Private Sub Latihan24B_36109005_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Public Class Form26A Dim NONN As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\DATATRANSAKSIJUALBELI.ACCDB") Dim WEWANG As New DataTable
Private Sub Form26A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim ADAPTER As New OleDb.OleDbDataAdapter ADAPTER = New OleDb.OleDbDataAdapter("SELECT * FROM BARANG", NONN) WEWANG.Rows.Clear()
Private Sub DT014_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DT014.Click If Form26B.Visible = False Then Form26B.Show() Else Form26B.Activate() Form26B.WindowState = FormWindowState.Normal End If
End Sub End Class Public Class Form26B Dim XX As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim X As New DataTable
Public Sub XXX(ByVal A As String) Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select*from detailtransaksi where KodeBarang='" & A & "'", XX) X.Rows.Clear() adapter.Fill(X)
FORM 25-A PublicClass Form25_A Dim dt AsNew DataTable Dim conect AsNew OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source ="& Application.StartupPath &"\DataTransaksiJualBeli.accdb")
PrivateSub Form25_A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load Dim adapter AsNew OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select * from barang", conect) dt.Rows.Clear() adapter.Fill(dt) adapter.Dispose() dgv_36109016.DataSource = dt EndSub
PrivateSub btn_36109016_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_36109016.Click If Form25_B.Visible = FalseThen Form25_B.Show() Else Form25_B.Activate() EndIf Form25_B.A_36109016.Text = dgv_36109016.CurrentRow.Cells("kodebarang").Value Form25_B.B_36109016.Text = dgv_36109016.CurrentRow.Cells("namabarang").Value Form25_B.C_36109016.Text = dgv_36109016.CurrentRow.Cells("hargajual").Value Form25_B.D_36109016.Text = dgv_36109016.CurrentRow.Cells("persediaanawal").Value
Form25_B.poktek(Form25_B.A_36109016.Text)
EndSub EndClass
FORM 25-B PublicClass Form25_B
Dim dt AsNew DataTable Dim conect AsNew OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source ="& Application.StartupPath &"\DataTransaksiJualBeli.accdb") PublicSub poktek(ByVal uthi AsString) Dim adapter AsNew OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("SELECT MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, MASTERTRANSAKSI.KETERANGAN, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, [DETAILTRANSAKSI]![UNIT]*[DETAILTRANSAKSI]![HARGA] AS JUMLAH FROM DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS=MASTERTRANSAKSI.NOTRANS WHERE KODEBARANG='"& uthi &"'", conect) dt.Rows.Clear() adapter.Fill(dt) adapter.Dispose() dgv_36109016.DataSource = dt EndSub EndClass
Public Class Latihan23A_36109006 Dim HARUN36109006 As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim HRN36109006 As New DataTable Private Sub Latihan23A_36109006_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select* from mastertransaksi", HARUN36109006) HRN36109006.Rows.Clear() adapter.Fill(HRN36109006) adapter.Dispose()
DGV_36109006.DataSource = HRN36109006
End Sub Private Sub Klik006_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Klik006.Click If Latihan23B_36109006.Visible = False Then Latihan23B_36109006.Show() Else : Latihan23B_36109006.Activate() End If
Public Class Latihan23B_36109006 Dim HARUN36109006 As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim HRN36109006 As New DataTable Public Sub muhammadharun(ByVal A As String) Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select*from detailtransaksi where notrans='" & A & "'", HARUN36109006) HRN36109006.Rows.Clear() adapter.Fill(HRN36109006)
FORM 26-A PublicClass Form26_A Dim dt AsNew DataTable Dim conect AsNew OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source ="& Application.StartupPath &"\DataTransaksiJualBeli.accdb")
PrivateSub Form26_A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load Dim adapter AsNew OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select*from barang", conect) dt.Rows.Clear() adapter.Fill(dt) adapter.Dispose() dgv_36109016.DataSource = dt EndSub
PrivateSub btn_36109016_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_36109016.Click If Form26_B.Visible = FalseThen Form26_B.Show() Else Form26_B.Activate() EndIf Form26_B.A_36109016.Text = dgv_36109016.CurrentRow.Cells("kodebarang").Value Form26_B.B_36109016.Text = dgv_36109016.CurrentRow.Cells("namabarang").Value Form26_B.C_36109016.Text = dgv_36109016.CurrentRow.Cells("hargajual").Value Form26_B.D_36109016.Text = dgv_36109016.CurrentRow.Cells("persediaanawal").Value
Form26_B.poltek(Form26_B.A_36109016.Text)
EndSub EndClass
FORM 26-B PublicClass Form26_B Dim dt AsNew DataTable Dim conect AsNew OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source ="& Application.StartupPath &"\DataTransaksiJualBeli.accdb")
PublicSub poltek(ByVal ak AsString) Dim adapter AsNew OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("SELECT MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, MASTERTRANSAKSI.KETERANGAN, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, [DETAILTRANSAKSI]![UNIT]*[DETAILTRANSAKSI]![HARGA] AS JUMLAH FROM DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS=MASTERTRANSAKSI.NOTRANS WHERE KODEBARANG='"& ak &"'", conect) dt.Rows.Clear() adapter.Fill(dt) adapter.Dispose() dgv_36109016.DataSource = dt
Dim poltek AsInteger Dim uthi AsInteger ForEach baris As DataRow In dt.Rows poltek = poltek + baris("UNIT") uthi = uthi + baris("JUMLAH") Next totunit_36109016.Text = poltek jumlah_36109016.Text = uthi
Public Class Form24A_36109006 Dim HARUN As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim HRN As New DataTable Private Sub Form24A_36109006_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select*from Barang", HARUN) HRN.Rows.Clear() adapter.Fill(HRN) adapter.Dispose()
DGVA_36109006.DataSource = HRN
End Sub Private Sub Klik006_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Klik006.Click If Form24B_36109006.Visible = False Then Form24B_36109006.Show() Else : Form24B_36109006.Activate() End If
Public Class Form24B_36109006 Dim HARUN As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim HRN As New DataTable Public Sub uly(ByVal A As String) Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select*from detailtransaksi where KodeBarang='" & A & "'", HARUN) HRN.Rows.Clear() adapter.Fill(HRN)
Public Class Form25A_36109006 Dim HARUN As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim HRN As New DataTable Private Sub Form25A_36109006_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select*from Barang", HARUN) HRN.Rows.Clear() adapter.Fill(HRN) adapter.Dispose()
DGVA_36109006.DataSource = HRN
End Sub Private Sub Klik006_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Klik006.Click If Form25B_36109006.Visible = False Then Form25B_36109006.Show() Else : Form25B_36109006.Activate() End If
Public Class Form25B_36109006 Dim HARUN As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim HRN As New DataTable Public Sub HRUN(ByVal A As String) Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, MASTERTRANSAKSI.KETERANGAN, DETAILTRANSAKSI.UHRN, DETAILTRANSAKSI.HARGA, [DETAILTRANSAKSI]![UHRN]*[DETAILTRANSAKSI]![HARGA] AS Jumlah FROM MASTERTRANSAKSI INNER JOIN DETAILTRANSAKSI ON MASTERTRANSAKSI.NOTRANS = DETAILTRANSAKSI.NOTRANS WHERE KODEBARANG = '" & A & "'", HARUN) HRN.Rows.Clear() adapter.Fill(HRN) adapter.Dispose()
Public Class Form26A_36109006 Dim HARUN As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim HRUN As New DataTable Private Sub Form26A_36109006_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select*from Barang", HARUN) HRUN.Rows.Clear() adapter.Fill(HRUN) adapter.Dispose()
DGVA_36109006.DataSource = HRUN
End Sub
Private Sub Klik006_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Klik006.Click If Form26B_36109006.Visible = False Then Form26B_36109006.Show() Else : Form26B_36109006.Activate() End If
Public Class Form26B_36109006 Dim HARUN As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim HRUN As New DataTable Public Sub HRN(ByVal A As String) Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, MASTERTRANSAKSI.KETERANGAN, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, [DETAILTRANSAKSI]![UNIT]*[DETAILTRANSAKSI]![HARGA] AS Jumlah FROM MASTERTRANSAKSI INNER JOIN DETAILTRANSAKSI ON MASTERTRANSAKSI.NOTRANS = DETAILTRANSAKSI.NOTRANS WHERE KODEBARANG = '" & A & "'", HARUN) HRUN.Rows.Clear() adapter.Fill(HRUN) adapter.Dispose()
DGVB_36109006.DataSource = HRUN
Dim tu As Integer Dim total As Integer For Each baris As DataRow In HRUN.Rows tu = tu + baris("UNIT") total = total + baris("JUMLAH") Next TOTALUNIT_36109006.Text = tu TOTALJUMLAH_36109006.Text = total
Public Class Form25A_36109001 Dim APREAL As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim APRIL As New DataTable Private Sub Latihan25A_36109005_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select*from Barang", APREAL) APRIL.Rows.Clear() adapter.Fill(APRIL) adapter.Dispose()
dgv_001_36109001.DataSource = APRIL
End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1_36109001.Click If Form25B_36109001.Visible = False Then Form25B_36109001.Show() Else : Form25B_36109001.Activate() End If
Public Class Form25B_36109001 Dim APREAL As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim april As New DataTable Public Sub NINJA(ByVal A As String) Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, MASTERTRANSAKSI.KETERANGAN, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, [DETAILTRANSAKSI]![UAPRIL]*[DETAILTRANSAKSI]![HARGA] AS Jumlah FROM MASTERTRANSAKSI INNER JOIN DETAILTRANSAKSI ON MASTERTRANSAKSI.NOTRANS = DETAILTRANSAKSI.NOTRANS WHERE KODEBARANG = '" & A & "'", APREAL) APRIL.Rows.Clear() adapter.Fill(april) adapter.Dispose()
DGVB_001.DataSource = april
End Sub
Private Sub Form25B_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Public Class Form26A_36109001 Dim APREAL As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim APRIL As New DataTable Private Sub Latihan26A_36109005_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select*from Barang", APREAL) APRIL.Rows.Clear() adapter.Fill(APRIL) adapter.Dispose()
dgv01_36109001.DataSource = APRIL
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1_36109001.Click If Form26B_36109001.Visible = False Then Form26B_36109001.Show() Else : Form26B_36109001.Activate() End If
Public Class Form26B_36109001 Dim APREAL As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim APRIL As New DataTable Public Sub ninja(ByVal A As String) Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, MASTERTRANSAKSI.KETERANGAN, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, [DETAILTRANSAKSI]![UNIT]*[DETAILTRANSAKSI]![HARGA] AS Jumlah FROM MASTERTRANSAKSI INNER JOIN DETAILTRANSAKSI ON MASTERTRANSAKSI.NOTRANS = DETAILTRANSAKSI.NOTRANS WHERE KODEBARANG = '" & A & "'", APREAL) APRIL.Rows.Clear() adapter.Fill(APRIL) adapter.Dispose()
DGV1_001.DataSource = APRIL
Dim tu As Integer Dim total As Integer For Each baris As DataRow In APRIL.Rows tu = tu + baris("UNIT") total = total + baris("JUMLAH") Next TU_001.Text = tu TJ_001.Text = total
End Sub
Private Sub Form26B_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Public Class Latihan23A Dim NINI_DT As New DataTable Dim NINI_36109008 As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Private Sub KLIK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button_36109008.Click If Latihan23B.Visible = False Then Latihan23B.Show() Else Latihan23B.Activate() End If
Private Sub Latihan23A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim np_36109008 As New OleDb.OleDbDataAdapter np_36109008 = New OleDb.OleDbDataAdapter("select * From MASTERTRANSAKSI", NINI_36109008) NINI_DT.Rows.Clear() np_36109008.Fill(NINI_DT) np_36109008.Dispose() DGV_36109008.DataSource = NINI_DT
End Sub End Class
Latihan 23B
Public Class Latihan23B
Dim NINI_DT As New DataTable Dim NINI_36109008 As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Public Sub ANISA(ByVal NISA As String) Dim np1_36109008 As New OleDb.OleDbDataAdapter np1_36109008 = New OleDb.OleDbDataAdapter("select * From DETAILTRANSAKSI Where NOTRANS='" & NISA & "'", NINI_36109008) NINI_DT.Rows.Clear() np1_36109008.Fill(NINI_DT) np1_36109008.Dispose() DGV_36109008.DataSource = NINI_DT
End Sub
Private Sub Latihan23B_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim NINI_DT As New DataTable Dim NINI_36109008 As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Private Sub Latihan24A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim np_36109008 As New OleDb.OleDbDataAdapter np_36109008 = New OleDb.OleDbDataAdapter("select * From BARANG", NINI_36109008) NINI_DT.Rows.Clear() np_36109008.Fill(NINI_DT) np_36109008.Dispose() DGV_36109008.DataSource = NINI_DT End Sub Private Sub button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button_36109008.Click If Latihan24B.Visible = False Then Latihan24B.Show() Else Latihan24B.Activate() End If
Latihan24B.ANISA(Latihan24B.KB_36109008.Text) End Sub End Class
Latihan 24B
Public Class Latihan24B
Dim NINI_DT As New DataTable Dim NINI_36109008 As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Public Sub ANISA(ByVal NISA As String) Dim np1_36109008 As New OleDb.OleDbDataAdapter np1_36109008 = New OleDb.OleDbDataAdapter("select * From DETAILTRANSAKSI Where KODEBARANG='" & NISA & "'", NINI_36109008) NINI_DT.Rows.Clear() np1_36109008.Fill(NINI_DT) np1_36109008.Dispose() DGV_36109008.DataSource = NINI_DT End Sub
Private Sub Latihan24B_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim NINI_DT As New DataTable Dim NINI_36109008 As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Private Sub Latihan25A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim np_36109008 As New OleDb.OleDbDataAdapter np_36109008 = New OleDb.OleDbDataAdapter("select * From BARANG", NINI_36109008) NINI_DT.Rows.Clear() np_36109008.Fill(NINI_DT) np_36109008.Dispose() DGV_36109008.DataSource = NINI_DT End Sub
Private Sub button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button_36109008.Click If Latihan25B.Visible = False Then Latihan25B.Show() Else Latihan25B.Activate() End If
Latihan25B.ANISA(Latihan25B.KB_36109008.Text) End Sub End Class
Latihan 25B
Public Class Latihan25B
Dim NINI_DT As New DataTable Dim NINI_36109008 As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Public Sub ANISA(ByVal NISA As String) Dim np1_36109008 As New OleDb.OleDbDataAdapter np1_36109008 = New OleDb.OleDbDataAdapter("select MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, MASTERTRANSAKSI.KETERANGAN, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, [DETAILTRANSAKSI]![UNIT]*[DETAILTRANSAKSI]![HARGA] AS JUMLAH FROM DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS = MASTERTRANSAKSI.NOTRANS WHERE KODEBARANG = '" & NISA & "'", NINI_36109008) NINI_DT.Rows.Clear() np1_36109008.Fill(NINI_DT) np1_36109008.Dispose() DGV_36109008.DataSource = NINI_DT End Sub
Private Sub Latihan25B_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim NINI_DT As New DataTable Dim NINI_36109008 As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Private Sub Latihan26A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim np_36109008 As New OleDb.OleDbDataAdapter np_36109008 = New OleDb.OleDbDataAdapter("select * From BARANG", NINI_36109008) NINI_DT.Rows.Clear() np_36109008.Fill(NINI_DT) np_36109008.Dispose() DGV_36109008.DataSource = NINI_DT End Sub
Private Sub button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button_36109008.Click If Latihan26B.Visible = False Then Latihan26B.Show() Else Latihan26B.Activate() End If
Latihan26B.ANISA(Latihan26B.KB_36109008.Text) End Sub End Class
Latihan 26B
Public Class Latihan26B
Dim NINI_DT As New DataTable Dim NINI_36109008 As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Public Sub ANISA(ByVal NISA As String) Dim np1_36109008 As New OleDb.OleDbDataAdapter np1_36109008 = New OleDb.OleDbDataAdapter("select MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, MASTERTRANSAKSI.KETERANGAN, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, [DETAILTRANSAKSI]![UNIT]*[DETAILTRANSAKSI]![HARGA] AS JUMLAH FROM DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS = MASTERTRANSAKSI.NOTRANS WHERE KODEBARANG = '" & NISA & "'", NINI_36109008) NINI_DT.Rows.Clear() np1_36109008.Fill(NINI_DT) np1_36109008.Dispose() DGV_36109008.DataSource = NINI_DT
Dim nini1_36109008 As Integer Dim nini2_36109008 As Integer For Each queen As DataRow In NINI_DT.Rows nini1_36109008 = nini1_36109008 + queen("Unit") nini2_36109008 = nini2_36109008 + queen("Jumlah") Next TU_36109008.Text = nini1_36109008 TJ_36109008.Text = nini2_36109008 End Sub
Private Sub Latihan26B_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
361 09 022 Public Class Form23 Dim Ami_DT_36109022 As New DataTable Dim rahmi_36109022 As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'") Private Sub klik_36109022_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles klik_36109022.Click If Form23B.Visible = False Then Form23B.Show() Else Form23B.Activate() End If
Private Sub Form23_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim am_36109022 As New OleDb.OleDbDataAdapter Dim aL_36109022 As New OleDb.OleDbDataAdapter aL_36109022 = New OleDb.OleDbDataAdapter("select * From MASTERTRANSAKSI", rahmi_36109022) Ami_DT_36109022.Rows.Clear() aL_36109022.Fill(Ami_DT_36109022) aL_36109022.Dispose() tampil_36109022.DataSource = Ami_DT_36109022
End Sub End Class Public Class Form23B Dim ami_dt_36109022 As New DataTable Dim rahmi_36109022 As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'") Public Sub Aya(ByVal JHUJHA As String) Dim aL1_36109022 As New OleDb.OleDbDataAdapter aL1_36109022 = New OleDb.OleDbDataAdapter("select * From DETAILTRANSAKSI Where NOTRANS='" & JHUJHA & "'", rahmi_36109022) ami_dt_36109022.Rows.Clear() aL1_36109022.Fill(ami_dt_36109022) aL1_36109022.Dispose() tampil_36109022.DataSource = ami_dt_36109022 End Sub
Private Sub Form23B_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub End Class Public Class Form24 Dim Ami_DT_36109022 As New DataTable Dim rahmi_36109022 As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'") Private Sub Form24_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim am_36109022 As New OleDb.OleDbDataAdapter Dim aL_36109022 As New OleDb.OleDbDataAdapter aL_36109022 = New OleDb.OleDbDataAdapter("select * From BARANG", rahmi_36109022) Ami_DT_36109022.Rows.Clear() aL_36109022.Fill(Ami_DT_36109022) aL_36109022.Dispose() tampil_36109022.DataSource = Ami_DT_36109022
End Sub
Private Sub klik_36109022_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles klik_36109022.Click If Form24B.Visible = False Then Form24B.Show() Else Form24B.Activate() End If
RIDHAYANTI SALEH
BalasHapus36109015
3A-D3
TUGAS 24B-25B
- TUGAS 24B
Public Class Form24B_36109015
Dim ridha As New DataTable
Dim risa As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Public Sub uly(ByVal A As String)
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select id, notrans, unit, harga from DETAILTRANSAKSI where KODEBARANG ='" & A & "'", risa)
ridha.Rows.Clear()
adapter.Fill(ridha)
dgv_36109015.DataSource = ridha
End Sub
End Class
- TUGAS 25A
Public Class Form25A_36109015
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim ak As New DataTable
Private Sub btn_36109015_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_36109015.Click
If Form25B_36109015.Visible = False Then
Form25B_36109015.Show()
Else
Form25B_36109015.Activate()
End If
Form25B_36109015.kb_36109015.Text = dgv_36109015.CurrentRow.Cells("kodebarang").Value
Form25B_36109015.nb_36109015.Text = dgv_36109015.CurrentRow.Cells("namabarang").Value
Form25B_36109015.jb_36109015.Text = dgv_36109015.CurrentRow.Cells("persediaanawal").Value
Form25B_36109015.hj_36109015.Text = dgv_36109015.CurrentRow.Cells("hargajual").Value
Form25B_36109015.uly(Form25B_36109015.kb_36109015.Text)
End Sub
Private Sub Form25A_36109015_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim risa As New OleDb.OleDbDataAdapter
risa = New OleDb.OleDbDataAdapter("select * from BARANG", CONECT)
risa.Fill(ak)
risa.Dispose()
dgv_36109015.DataSource = ak
End Sub
End Class
- TUGAS 25B
Public Class Form25B_36109015
Dim ridha As New DataTable
Dim risa As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Public Sub uly(ByVal A As String)
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select id, notrans, unit, harga from DETAILTRANSAKSI where KODEBARANG ='" & A & "'", risa)
ridha.Rows.Clear()
adapter.Fill(ridha)
dgv2_36109015.DataSource = ridha
End Sub
Private Sub Form25B_36109015_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
RIDHAYANTI SALEH
BalasHapus36109015
3A-D3
TUGAS 26
- TUGAS 26A
Public Class Form26A_36109015
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim ak As New DataTable
Private Sub Form26A_36109015_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim risa As New OleDb.OleDbDataAdapter
risa = New OleDb.OleDbDataAdapter("select * from BARANG", CONECT)
risa.Fill(ak)
risa.Dispose()
dgv1_36109015.DataSource = ak
End Sub
Private Sub btn_36109015_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_36109015.Click
If Form26B_36109015.Visible = False Then
Form26B_36109015.Show()
Else
Form26B_36109015.Activate()
End If
Form26B_36109015.kb_36109015.Text = dgv1_36109015.CurrentRow.Cells("kodebarang").Value
Form26B_36109015.nb_36109015.Text = dgv1_36109015.CurrentRow.Cells("namabarang").Value
Form26B_36109015.jb_36109015.Text = dgv1_36109015.CurrentRow.Cells("persediaanawal").Value
Form26B_36109015.hj_36109015.Text = dgv1_36109015.CurrentRow.Cells("hargajual").Value
Form26B_36109015.uly(Form26B_36109015.kb_36109015.Text)
End Sub
End Class
- TUGAS 26B
Public Class Form26B_36109015
Dim ridha As New DataTable
Dim risa As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Public Sub uly(ByVal A As String)
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("SELECT MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, MASTERTRANSAKSI.KETERANGAN, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, [DETAILTRANSAKSI]![UNIT]*[DETAILTRANSAKSI]![HARGA] AS jumlah FROM DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS = MASTERTRANSAKSI.NOTRANS where KODEBARANG ='" & A & "'", risa)
ridha.Rows.Clear()
adapter.Fill(ridha)
adapter.Dispose()
dgv2_36109015.DataSource = ridha
Dim tu, total As Integer
For Each x As DataRow In ridha.Rows
tu = tu + x("unit")
total = total + x("jumlah")
Next
tu_36109015.Text = tu
tj_36109015.Text = total
End Sub
End Class
TERIMA KASIH PAK.^_^
Latihan 23
BalasHapusPublic Class Form23A
Dim febri As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tabel As New DataTable
Private Sub Form23A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim riri As New OleDb.OleDbDataAdapter
riri = New OleDb.OleDbDataAdapter("select*from mastertransaksi", febri)
tabel.Rows.Clear()
riri.Fill(tabel)
riri.Dispose()
dgv36109007.DataSource = tabel
End Sub
Private Sub btn36109007_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn36109007.Click
If Form23B.Visible = False Then
Form23B.Show()
Else
Form23B.Activate()
End If
Form23B.txt136109007.Text = dgv36109007.CurrentRow.Cells("notrans").Value
Form23B.dtp36109007.Value = dgv36109007.CurrentRow.Cells("tanggaltransaksi").Value
Form23B.txt236109007.Text = dgv36109007.CurrentRow.Cells("jenistransaksi").Value
Form23B.jawa(Form23B.txt136109007.Text)
End Sub
End Class
Public Class Form23B
Dim febri As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim riri As New DataTable
Public Sub jawa(ByVal A As String)
Dim surya As New OleDb.OleDbDataAdapter
surya = New OleDb.OleDbDataAdapter("select*from detailtransaksi where notrans='" & A & "'", febri)
riri.Rows.Clear()
surya.Fill(riri)
dgv361090071.DataSource = riri
End Sub
Private Sub Form23B_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Public Class Form24A
BalasHapusDim febri As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tabel As New DataTable
Latihan 24
Private Sub Form24A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim riri As New OleDb.OleDbDataAdapter
riri = New OleDb.OleDbDataAdapter("select *from barang", febri)
tabel.Rows.Clear()
riri.Fill(tabel)
riri.Dispose()
dgv36109007.DataSource = tabel
End Sub
Private Sub btn36109007_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn36109007.Click
If Form24B.Visible = False Then
Form24B.Show()
Else
Form24B.Activate()
End If
Form24B.txt136109007.Text = dgv36109007.CurrentRow.Cells("kodebarang").Value
Form24B.txt236109007.Text = dgv36109007.CurrentRow.Cells("namabarang").Value
Form24B.txt336109007.Text = dgv36109007.CurrentRow.Cells("hargajual").Value
Form24B.txt436109007.Text = dgv36109007.CurrentRow.Cells("persediaanawal").Value
Form24B.jawa(Form24B.txt136109007.Text)
End Sub
End Class
Public Class Form24B
Dim febri As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim riri As New DataTable
Public Sub jawa(ByVal A As String)
Dim surya As New OleDb.OleDbDataAdapter
surya = New OleDb.OleDbDataAdapter("select*from detailtransaksi where kodebarang='" & A & "'", febri)
riri.Rows.Clear()
surya.Fill(riri)
dgv36109007.DataSource = riri
End Sub
Private Sub Form24B_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Public Class Form25A
BalasHapusDim febri As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tabel As New DataTable
Latihan 25
Private Sub Form25A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim riri As New OleDb.OleDbDataAdapter
riri = New OleDb.OleDbDataAdapter("select *from barang", febri)
tabel.Rows.Clear()
riri.Fill(tabel)
riri.Dispose()
dgv36109007.DataSource = tabel
End Sub
Private Sub btn36109007_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn36109007.Click
If Form25B.Visible = False Then
Form25B.Show()
Else
Form25B.Activate()
End If
Form25B.txt136109007.Text = dgv36109007.CurrentRow.Cells("kodebarang").Value
Form25B.txt236109007.Text = dgv36109007.CurrentRow.Cells("namabarang").Value
Form25B.txt336109007.Text = dgv36109007.CurrentRow.Cells("hargajual").Value
Form25B.txt436109007.Text = dgv36109007.CurrentRow.Cells("persediaanawal").Value
Form25B.jawa(Form25B.txt136109007.Text)
End Sub
End Class
Public Class Form25B
Dim febri As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim riri As New DataTable
Public Sub jawa(ByVal A As String)
Dim surya As New OleDb.OleDbDataAdapter
surya = New OleDb.OleDbDataAdapter("select * from Query5", febri)
riri.Rows.Clear()
surya.Fill(riri)
dgv36109007.DataSource = riri
End Sub
Private Sub Form25B_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Public NotInheritable Class form24b_36109003
BalasHapusDim anto As New DataTable
Dim ndut As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Public Sub uly(ByVal A As String)
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select id, notrans, unit, harga from DETAILTRANSAKSI where KODEBARANG ='" & A & "'", ndut)
anto.Rows.Clear()
adapter.Fill(anto)
dgv2_36109003.DataSource = anto
End Sub
Private Sub form24b_36109003_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Public NotInheritable Class form25b_36109003
BalasHapusDim anto As New DataTable
Dim ndut As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Public Sub uly(ByVal A As String)
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select notrans, tanggaltransaksi, jenistransaksi, keterangan, unit, harga, jumlah from Query5 where KODEBARANG ='" & A & "'", ndut)
anto.Rows.Clear()
adapter.Fill(anto)
dgv2_36109003.DataSource = anto
End Sub
Private Sub form25b_36109003_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Public NotInheritable Class form26a_36109003
BalasHapusDim anto As New DataTable
Dim ndut As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Private Sub form26a_36109003_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim soe As New OleDb.OleDbDataAdapter
soe = New OleDb.OleDbDataAdapter("select * from BARANG", ndut)
soe.Fill(anto)
soe.Dispose()
dgv1_36109003.DataSource = anto
End Sub
Private Sub klik_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles klik.Click
If form26b_36109003.Visible = False Then
form26b_36109003.Show()
Else
form26b_36109003.Activate()
End If
form26b_36109003.kb_36109003.Text = dgv1_36109003.CurrentRow.Cells("kodebarang").Value
form26b_36109003.nb_36109003.Text = dgv1_36109003.CurrentRow.Cells("namabarang").Value
form26b_36109003.jb_36109003.Text = dgv1_36109003.CurrentRow.Cells("persediaanawal").Value
form26b_36109003.hj_36109003.Text = dgv1_36109003.CurrentRow.Cells("hargajual").Value
form26b_36109003.uly(form26b_36109003.kb_36109003.Text)
End Sub
End Class
Public NotInheritable Class form26b_36109003
BalasHapusDim anto As New DataTable
Dim ndut As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Public Sub uly(ByVal A As String)
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select notrans, tanggaltransaksi, jenistransaksi, keterangan, unit, harga, jumlah from Query5 where KODEBARANG ='" & A & "'", ndut)
anto.Rows.Clear()
adapter.Fill(anto)
dgv2_36109003.DataSource = anto
End Sub
Private Sub form26b_36109003_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub dgv2_36109003_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgv2_36109003.CellContentClick
Dim tu, total As Integer
For Each x As DataRow In anto.Rows
tu = tu + x("unit")
total = total + x("jumlah")
Next
totunit_36109003.Text = tu
totjum_36109003.Text = total
End Sub
End Class
RUSNANINGSI R
BalasHapus36109010
Public Class Form23A
Dim rusna_DT As New DataTable
Dim Ningsi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Private Sub Form23A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim a As New OleDb.OleDbDataAdapter
a = New OleDb.OleDbDataAdapter("select * from MASTERTRANSAKSI", Ningsi)
a.Fill(rusna_DT)
a.Dispose()
dgv_36109010.DataSource = rusna_DT
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Form23B.Visible = False Then
Form23B.Show()
Else
Form23B.Activate()
End If
Form23B.nr_36109010.Text = dgv_36109010.CurrentRow.Cells("notrans").Value
Form23B.tgl_36109010.Value = dgv_36109010.CurrentRow.Cells("tanggaltransaksi").Value
Form23B.jns_36109010.Text = dgv_36109010.CurrentRow.Cells("jenistransaksi").Value
Form23B.uly(Form23B.nr_36109010.Text)
End Sub
End Class
---------------------------------------------
Public Class Form23B
Dim rusna_DT As New DataTable
Dim Ningsi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Public Sub uly(ByVal A As String)
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select id, kodebarang, unit, harga from DETAILTRANSAKSI where NOTRANS='" & A & "'", Ningsi)
rusna_DT.Rows.Clear()
adapter.Fill(rusna_DT)
dgv_36109010.DataSource = rusna_DT
End Sub
Private Sub Form23B_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub dgv_36109010_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgv_36109010.CellContentClick
End Sub
End Class
Public Class Form24A
BalasHapusDim rusna_DT As New DataTable
Dim Ningsi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Private Sub Form24A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim a As New OleDb.OleDbDataAdapter
a = New OleDb.OleDbDataAdapter("select * from BARANG", Ningsi)
a.Fill(rusna_DT)
a.Dispose()
dgv_36109010.DataSource = rusna_DT
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Form24B.Visible = False Then
Form24B.Show()
Else
Form24B.Activate()
End If
Form24B.kb_36109010.Text = dgv_36109010.CurrentRow.Cells("kodebarang").Value
Form24B.nb_36109010.Text = dgv_36109010.CurrentRow.Cells("namabarang").Value
Form24B.hj_36109010.Text = dgv_36109010.CurrentRow.Cells("hargajual").Value
Form24B.jb_36109010.Text = dgv_36109010.CurrentRow.Cells("persediaanawal").Value
Form24B.uly(Form24B.kb_36109010.Text)
End Sub
End Class
----------------------------------------------
Public Class Form24B
Dim rusna As New DataTable
Dim virgo As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Public Sub uly(ByVal A As String)
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select id, notrans, unit, harga from DETAILTRANSAKSI where KODEBARANG ='" & A & "'", virgo)
rusna.Rows.Clear()
adapter.Fill(rusna)
dgv_36109010.DataSource = rusna
End Sub
Private Sub Form24B_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Public Class Form23
BalasHapusDim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tabel As New DataTable
Private Sub Form23_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select*from mastertransaksi", koneksi)
tabel.Rows.Clear()
adapter.Fill(tabel)
adapter.Dispose()
DataGridView1.DataSource = tabel
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Form23b.Visible = False Then
Form23b.Show()
Else : Form23b.Activate()
End If
Form23b.Label1.Text = DataGridView1.CurrentRow.Cells("notrans").Value
Form23b.DateTimePicker1.Value = DataGridView1.CurrentRow.Cells("tanggaltransaksi").Value
Form23b.apreal2.Text = DataGridView1.CurrentRow.Cells("jenistransaksi").Value
Form23b.apreal(Form23b.textbox1.Text)
End Sub
End Class
Public Class Form23b
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tabel As New DataTable
Public Sub apreal(ByVal A As String)
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select*from detailtransaksi where notrans='" & A & "'", koneksi)
tabel.Rows.Clear()
adapter.Fill(tabel)
DataGridView1.DataSource = tabel
End Sub
Private Sub Form23b_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Public Class Form23A
BalasHapusDim TETEN As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim NONN As New DataTable
Private Sub Form23A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select* from mastertransaksi", TETEN)
NONN.Rows.Clear()
adapter.Fill(NONN)
adapter.Dispose()
DGV014.DataSource = NONN
End Sub
Private Sub KLIK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KLIK.Click
If Form23B.Visible = False Then
Form23B.Show()
Else : Form23B.Activate()
End If
Form23B.NOMOR014.Text = DGV014.CurrentRow.Cells("NoTrans").Value
Form23B.TANGGAL014.Value = DGV014.CurrentRow.Cells("TanggalTransaksi").Value
Form23B.JENIS014.Text = DGV014.CurrentRow.Cells("JenisTransaksi").Value
Form23B.NONNTEEN(Form23B.NOMOR014.Text)
End Sub
End Class
Public Class Form23B
Dim TETEN As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim NONN As New DataTable
Public Sub NONNTEEN(ByVal A As String)
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select*from detailtransaksi where notrans='" & A & "'", TETEN)
NONN.Rows.Clear()
adapter.Fill(NONN)
DGV014.DataSource = NONN
End Sub
End Class
ANDI TENRI WEWANG-36109014
BalasHapusPublic Class Form24A
Dim SOPPENG As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim BONE As New DataTable
Private Sub Form24A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select*from Barang", SOPPENG)
BONE.Rows.Clear()
adapter.Fill(BONE)
adapter.Dispose()
DGV014.DataSource = BONE
End Sub
Private Sub DT014_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DT014.Click
If Form24B.Visible = False Then
Form24B.Show()
Else : Form24B.Activate()
End If
Form24B.KB014.Text = DGV014.CurrentRow.Cells("KodeBarang").Value
Form24B.NB014.Text = DGV014.CurrentRow.Cells("NamaBarang").Value
Form24B.HJ014.Text = DGV014.CurrentRow.Cells("PersediaanAwal").Value
Form24B.JB014.Text = DGV014.CurrentRow.Cells("HargaJual").Value
Form24B.ATW(Form24B.KB014.Text)
End Sub
End Class
Public Class Form24B
Dim SOPPENG As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim BONE As New DataTable
Public Sub ATW(ByVal A As String)
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select*from detailtransaksi where KodeBarang='" & A & "'", SOPPENG)
BONE.Rows.Clear()
adapter.Fill(BONE)
DGV014.DataSource = BONE
End Sub
End Class
Public Class Form25A
BalasHapusDim SOPPENG As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim BONE As New DataTable
Private Sub Form25A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select*from Barang", SOPPENG)
BONE.Rows.Clear()
adapter.Fill(BONE)
adapter.Dispose()
DGV014.DataSource = BONE
End Sub
Private Sub DT014_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DT014.Click
If Form25B.Visible = False Then
Form25B.Show()
Else : Form25B.Activate()
End If
Form25B.KB014.Text = DGV014.CurrentRow.Cells("KodeBarang").Value
Form25B.NB014.Text = DGV014.CurrentRow.Cells("NamaBarang").Value
Form25B.HJ014.Text = DGV014.CurrentRow.Cells("PersediaanAwal").Value
Form25B.JB014.Text = DGV014.CurrentRow.Cells("HargaJual").Value
Form25B.ATWG(Form25B.KB014.Text)
End Sub
End Class
Public Class Form25B
Dim SOPPENG As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim BONE As New DataTable
Public Sub ATWG(ByVal A As String)
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select*from detailtransaksi where KodeBarang='" & A & "'", SOPPENG)
BONE.Rows.Clear()
adapter.Fill(BONE)
DGV014.DataSource = BONE
End Sub
End Class
RUSNANINGSI R
BalasHapus36109010
Public Class Form26A
Dim rusna_DT As New DataTable
Dim Ningsi As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Private Sub Form26A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim a As New OleDb.OleDbDataAdapter
a = New OleDb.OleDbDataAdapter("select * from BARANG", Ningsi)
a.Fill(rusna_DT)
a.Dispose()
dgv1_36109010.DataSource = rusna_DT
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Form26B.Visible = False Then
Form26B.Show()
Else
Form26B.Activate()
End If
Form26B.kb_36109010.Text = dgv1_36109010.CurrentRow.Cells("kodebarang").Value
Form26B.nb_36109010.Text = dgv1_36109010.CurrentRow.Cells("namabarang").Value
Form26B.jb_36109010.Text = dgv1_36109010.CurrentRow.Cells("persediaanawal").Value
Form26B.hj_36109010.Text = dgv1_36109010.CurrentRow.Cells("hargajual").Value
Form26B.uly(Form26B.kb_36109010.Text)
End Sub
End Class
---------------------------------------
Public Class Form26B
Dim rusna As New DataTable
Dim virgo As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Public Sub uly(ByVal A As String)
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select notrans, tanggaltransaksi, jenistransaksi, keterangan, unit, harga, jumlah from Query5 where KODEBARANG ='" & A & "'", virgo)
rusna.Rows.Clear()
adapter.Fill(rusna)
dgv2_36109010.DataSource = rusna
End Sub
Private Sub Form26B_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub dgv2_36109010_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgv2_36109010.CellContentClick
Dim tu, total As Integer
For Each x As DataRow In rusna.Rows
tu = tu + x("unit")
total = total + x("jumlah")
Next
totunit_36109003.Text = tu
totjum_36109003.Text = total
End Sub
End Class
Public Class Form25A
BalasHapusDim rusna As New DataTable
Dim virgo As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Private Sub Form25A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ningsi As New OleDb.OleDbDataAdapter
ningsi = New OleDb.OleDbDataAdapter("select * from BARANG", virgo)
ningsi.Fill(rusna)
ningsi.Dispose()
dgv1_36109010.DataSource = rusna
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Form25B.Visible = False Then
Form25B.Show()
Else
Form25B.Activate()
End If
Form25B.kb_36109010.Text = dgv1_36109010.CurrentRow.Cells("kodebarang").Value
Form25B.nb_36109010.Text = dgv1_36109010.CurrentRow.Cells("namabarang").Value
Form25B.jb_36109010.Text = dgv1_36109010.CurrentRow.Cells("persediaanawal").Value
Form25B.hj_36109010.Text = dgv1_36109010.CurrentRow.Cells("hargajual").Value
Form25B.uly(Form25B.kb_36109010.Text)
End Sub
End Class
----------------------
Public Class Form25B
Dim rusna As New DataTable
Dim virgo As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Public Sub uly(ByVal A As String)
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select notrans, tanggaltransaksi, jenistransaksi, keterangan, unit, harga, jumlah from Query5 where KODEBARANG ='" & A & "'", virgo)
rusna.Rows.Clear()
adapter.Fill(rusna)
dgv2_36109010.DataSource = rusna
End Sub
End Class
Public Class Form24
BalasHapusDim apreal As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim april As New DataTable
Private Sub Latihan24A_001_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select*from Barang", apreal)
april.Rows.Clear()
adapter.Fill(april)
adapter.Dispose()
dgv01_001.DataSource = april
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Form24b.Visible = False Then
Form24b.Show()
Else : Form24b.Activate()
End If
Form24b.KB_001.Text = dgv01_001.CurrentRow.Cells("KodeBarang").Value
Form24b.NB_001.Text = dgv01_001.CurrentRow.Cells("NamaBarang").Value
Form24b.HJ_001.Text = dgv01_001.CurrentRow.Cells("PersediaanAwal").Value
Form24b.JB_001.Text = dgv01_001.CurrentRow.Cells("HargaJual").Value
Form24b.uly(Form24b.KB_001.Text)
End Sub
End Class
Public Class Form24b
Dim apreal As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim april As New DataTable
Public Sub uly(ByVal A As String)
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select*from detailtransaksi where KodeBarang='" & A & "'", apreal)
april.Rows.Clear()
adapter.Fill(april)
DGVB_36109001.DataSource = april
End Sub
Private Sub Latihan24B_36109005_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Public Class Form26A
BalasHapusDim NONN As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\DATATRANSAKSIJUALBELI.ACCDB")
Dim WEWANG As New DataTable
Private Sub Form26A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ADAPTER As New OleDb.OleDbDataAdapter
ADAPTER = New OleDb.OleDbDataAdapter("SELECT * FROM BARANG", NONN)
WEWANG.Rows.Clear()
ADAPTER.Fill(WEWANG)
DGV014.DataSource = WEWANG
ADAPTER.Dispose()
End Sub
Private Sub DT014_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DT014.Click
If Form26B.Visible = False Then
Form26B.Show()
Else
Form26B.Activate()
Form26B.WindowState = FormWindowState.Normal
End If
Form26B.KB014.Text = DGV014.CurrentRow.Cells("KODEBARANG").Value
Form26B.NB014.Text = DGV014.CurrentRow.Cells("NAMABARANG").Value
Form26B.HJ014.Text = DGV014.CurrentRow.Cells("HARGAJUAL").Value
Form26B.JB014.Text = DGV014.CurrentRow.Cells("PERSEDIAANAWAL").Value
Form26B.XXX(Form26B.KB014.Text)
End Sub
End Class
Public Class Form26B
Dim XX As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim X As New DataTable
Public Sub XXX(ByVal A As String)
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select*from detailtransaksi where KodeBarang='" & A & "'", XX)
X.Rows.Clear()
adapter.Fill(X)
DGV014.DataSource = X
End Sub
End Class
amelia indahsari
BalasHapus361 09 023
http://heiamee.blogspot.com/2011/11/form-23-26.html
HASTUTI
BalasHapus36109016
FORM 25-A
PublicClass Form25_A
Dim dt AsNew DataTable
Dim conect AsNew OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source ="& Application.StartupPath &"\DataTransaksiJualBeli.accdb")
PrivateSub Form25_A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load
Dim adapter AsNew OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select * from barang", conect)
dt.Rows.Clear()
adapter.Fill(dt)
adapter.Dispose()
dgv_36109016.DataSource = dt
EndSub
PrivateSub btn_36109016_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_36109016.Click
If Form25_B.Visible = FalseThen
Form25_B.Show()
Else
Form25_B.Activate()
EndIf
Form25_B.A_36109016.Text = dgv_36109016.CurrentRow.Cells("kodebarang").Value
Form25_B.B_36109016.Text = dgv_36109016.CurrentRow.Cells("namabarang").Value
Form25_B.C_36109016.Text = dgv_36109016.CurrentRow.Cells("hargajual").Value
Form25_B.D_36109016.Text = dgv_36109016.CurrentRow.Cells("persediaanawal").Value
Form25_B.poktek(Form25_B.A_36109016.Text)
EndSub
EndClass
FORM 25-B
PublicClass Form25_B
Dim dt AsNew DataTable
Dim conect AsNew OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source ="& Application.StartupPath &"\DataTransaksiJualBeli.accdb")
PublicSub poktek(ByVal uthi AsString)
Dim adapter AsNew OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("SELECT MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, MASTERTRANSAKSI.KETERANGAN, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, [DETAILTRANSAKSI]![UNIT]*[DETAILTRANSAKSI]![HARGA] AS JUMLAH FROM DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS=MASTERTRANSAKSI.NOTRANS WHERE KODEBARANG='"& uthi &"'", conect)
dt.Rows.Clear()
adapter.Fill(dt)
adapter.Dispose()
dgv_36109016.DataSource = dt
EndSub
EndClass
Public Class Latihan23A_36109006
BalasHapusDim HARUN36109006 As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim HRN36109006 As New DataTable
Private Sub Latihan23A_36109006_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select* from mastertransaksi", HARUN36109006)
HRN36109006.Rows.Clear()
adapter.Fill(HRN36109006)
adapter.Dispose()
DGV_36109006.DataSource = HRN36109006
End Sub
Private Sub Klik006_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Klik006.Click
If Latihan23B_36109006.Visible = False Then
Latihan23B_36109006.Show()
Else : Latihan23B_36109006.Activate()
End If
Latihan23B_36109006.N_36109006.Text = DGV_36109006.CurrentRow.Cells("NoTrans").Value
Latihan23B_36109006.DT_36109006.Value = DGV_36109006.CurrentRow.Cells("TanggalTransaksi").Value
Latihan23B_36109006.J_36109006.Text = DGV_36109006.CurrentRow.Cells("JenisTransaksi").Value
Latihan23B_36109006.muhammadharun(Latihan23B_36109006.N_36109006.Text)
End Sub
End Class
Public Class Latihan23B_36109006
Dim HARUN36109006 As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim HRN36109006 As New DataTable
Public Sub muhammadharun(ByVal A As String)
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select*from detailtransaksi where notrans='" & A & "'", HARUN36109006)
HRN36109006.Rows.Clear()
adapter.Fill(HRN36109006)
DGV1_36109006.DataSource = HRN36109006
End Sub
End Class
HASTUTI
BalasHapus36109016
FORM 26-A
PublicClass Form26_A
Dim dt AsNew DataTable
Dim conect AsNew OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source ="& Application.StartupPath &"\DataTransaksiJualBeli.accdb")
PrivateSub Form26_A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load
Dim adapter AsNew OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select*from barang", conect)
dt.Rows.Clear()
adapter.Fill(dt)
adapter.Dispose()
dgv_36109016.DataSource = dt
EndSub
PrivateSub btn_36109016_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_36109016.Click
If Form26_B.Visible = FalseThen
Form26_B.Show()
Else
Form26_B.Activate()
EndIf
Form26_B.A_36109016.Text = dgv_36109016.CurrentRow.Cells("kodebarang").Value
Form26_B.B_36109016.Text = dgv_36109016.CurrentRow.Cells("namabarang").Value
Form26_B.C_36109016.Text = dgv_36109016.CurrentRow.Cells("hargajual").Value
Form26_B.D_36109016.Text = dgv_36109016.CurrentRow.Cells("persediaanawal").Value
Form26_B.poltek(Form26_B.A_36109016.Text)
EndSub
EndClass
FORM 26-B
PublicClass Form26_B
Dim dt AsNew DataTable
Dim conect AsNew OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source ="& Application.StartupPath &"\DataTransaksiJualBeli.accdb")
PublicSub poltek(ByVal ak AsString)
Dim adapter AsNew OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("SELECT MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, MASTERTRANSAKSI.KETERANGAN, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, [DETAILTRANSAKSI]![UNIT]*[DETAILTRANSAKSI]![HARGA] AS JUMLAH FROM DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS=MASTERTRANSAKSI.NOTRANS WHERE KODEBARANG='"& ak &"'", conect)
dt.Rows.Clear()
adapter.Fill(dt)
adapter.Dispose()
dgv_36109016.DataSource = dt
Dim poltek AsInteger
Dim uthi AsInteger
ForEach baris As DataRow In dt.Rows
poltek = poltek + baris("UNIT")
uthi = uthi + baris("JUMLAH")
Next
totunit_36109016.Text = poltek
jumlah_36109016.Text = uthi
EndSub
EndClass
Public Class Form24A_36109006
BalasHapusDim HARUN As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim HRN As New DataTable
Private Sub Form24A_36109006_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select*from Barang", HARUN)
HRN.Rows.Clear()
adapter.Fill(HRN)
adapter.Dispose()
DGVA_36109006.DataSource = HRN
End Sub
Private Sub Klik006_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Klik006.Click
If Form24B_36109006.Visible = False Then
Form24B_36109006.Show()
Else : Form24B_36109006.Activate()
End If
Form24B_36109006.KODEBARANG006.Text = DGVA_36109006.CurrentRow.Cells("KodeBarang").Value
Form24B_36109006.NAMABARANG006.Text = DGVA_36109006.CurrentRow.Cells("NamaBarang").Value
Form24B_36109006.HARGAJUAL006.Text = DGVA_36109006.CurrentRow.Cells("PersediaanAwal").Value
Form24B_36109006.JUMLAHBARANG006.Text = DGVA_36109006.CurrentRow.Cells("HargaJual").Value
Form24B_36109006.uly(Form24B_36109006.KODEBARANG006.Text)
End Sub
End Class
Public Class Form24B_36109006
Dim HARUN As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim HRN As New DataTable
Public Sub uly(ByVal A As String)
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select*from detailtransaksi where KodeBarang='" & A & "'", HARUN)
HRN.Rows.Clear()
adapter.Fill(HRN)
DGVB_36109006.DataSource = HRN
End Sub
End Class
Public Class Form25A_36109006
BalasHapusDim HARUN As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim HRN As New DataTable
Private Sub Form25A_36109006_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select*from Barang", HARUN)
HRN.Rows.Clear()
adapter.Fill(HRN)
adapter.Dispose()
DGVA_36109006.DataSource = HRN
End Sub
Private Sub Klik006_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Klik006.Click
If Form25B_36109006.Visible = False Then
Form25B_36109006.Show()
Else : Form25B_36109006.Activate()
End If
Form25B_36109006.KODEBARANG1_36109006.Text = DGVA_36109006.CurrentRow.Cells("KodeBarang").Value
Form25B_36109006.NAMABARANG1_36109006.Text = DGVA_36109006.CurrentRow.Cells("NamaBarang").Value
Form25B_36109006.HARGAJUAL1_36109006.Text = DGVA_36109006.CurrentRow.Cells("PersediaanAwal").Value
Form25B_36109006.JUMLAHBARANG1_36109006.Text = DGVA_36109006.CurrentRow.Cells("HargaJual").Value
Form25B_36109006.HRUN(Form25B_36109006.KODEBARANG1_36109006.Text)
End Sub
End Class
Public Class Form25B_36109006
Dim HARUN As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim HRN As New DataTable
Public Sub HRUN(ByVal A As String)
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, MASTERTRANSAKSI.KETERANGAN, DETAILTRANSAKSI.UHRN, DETAILTRANSAKSI.HARGA, [DETAILTRANSAKSI]![UHRN]*[DETAILTRANSAKSI]![HARGA] AS Jumlah FROM MASTERTRANSAKSI INNER JOIN DETAILTRANSAKSI ON MASTERTRANSAKSI.NOTRANS = DETAILTRANSAKSI.NOTRANS WHERE KODEBARANG = '" & A & "'", HARUN)
HRN.Rows.Clear()
adapter.Fill(HRN)
adapter.Dispose()
DGVB_36109006.DataSource = HRN
End Sub
End Class
Public Class Form26A_36109006
BalasHapusDim HARUN As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim HRUN As New DataTable
Private Sub Form26A_36109006_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select*from Barang", HARUN)
HRUN.Rows.Clear()
adapter.Fill(HRUN)
adapter.Dispose()
DGVA_36109006.DataSource = HRUN
End Sub
Private Sub Klik006_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Klik006.Click
If Form26B_36109006.Visible = False Then
Form26B_36109006.Show()
Else : Form26B_36109006.Activate()
End If
Form26B_36109006.KODEBARANG1_36109006.Text = DGVA_36109006.CurrentRow.Cells("KodeBarang").Value
Form26B_36109006.NAMABARANG1_36109006.Text = DGVA_36109006.CurrentRow.Cells("NamaBarang").Value
Form26B_36109006.HARGAJUAL1_36109006.Text = DGVA_36109006.CurrentRow.Cells("PersediaanAwal").Value
Form26B_36109006.JUMLAHBARANG1_36109006.Text = DGVA_36109006.CurrentRow.Cells("HargaJual").Value
Form26B_36109006.HRN(Form26B_36109006.KODEBARANG1_36109006.Text)
End Sub
End Class
Public Class Form26B_36109006
Dim HARUN As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim HRUN As New DataTable
Public Sub HRN(ByVal A As String)
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, MASTERTRANSAKSI.KETERANGAN, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, [DETAILTRANSAKSI]![UNIT]*[DETAILTRANSAKSI]![HARGA] AS Jumlah FROM MASTERTRANSAKSI INNER JOIN DETAILTRANSAKSI ON MASTERTRANSAKSI.NOTRANS = DETAILTRANSAKSI.NOTRANS WHERE KODEBARANG = '" & A & "'", HARUN)
HRUN.Rows.Clear()
adapter.Fill(HRUN)
adapter.Dispose()
DGVB_36109006.DataSource = HRUN
Dim tu As Integer
Dim total As Integer
For Each baris As DataRow In HRUN.Rows
tu = tu + baris("UNIT")
total = total + baris("JUMLAH")
Next
TOTALUNIT_36109006.Text = tu
TOTALJUMLAH_36109006.Text = total
End Sub
End Class
Public Class Form25A_36109001
BalasHapusDim APREAL As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim APRIL As New DataTable
Private Sub Latihan25A_36109005_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select*from Barang", APREAL)
APRIL.Rows.Clear()
adapter.Fill(APRIL)
adapter.Dispose()
dgv_001_36109001.DataSource = APRIL
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1_36109001.Click
If Form25B_36109001.Visible = False Then
Form25B_36109001.Show()
Else : Form25B_36109001.Activate()
End If
Form25B_36109001.kb01_36109001.Text = dgv_001_36109001.CurrentRow.Cells("KodeBarang").Value
Form25B_36109001.nb01_36109001.Text = dgv_001_36109001.CurrentRow.Cells("NamaBarang").Value
Form25B_36109001.hj01_36109001.Text = dgv_001_36109001.CurrentRow.Cells("PersediaanAwal").Value
Form25B_36109001.jb01_36109001.Text = dgv_001_36109001.CurrentRow.Cells("HargaJual").Value
Form25B_36109001.NINJA(Form25B_36109001.kb01_36109001.Text)
End Sub
End Class
Public Class Form25B_36109001
Dim APREAL As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim april As New DataTable
Public Sub NINJA(ByVal A As String)
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, MASTERTRANSAKSI.KETERANGAN, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, [DETAILTRANSAKSI]![UAPRIL]*[DETAILTRANSAKSI]![HARGA] AS Jumlah FROM MASTERTRANSAKSI INNER JOIN DETAILTRANSAKSI ON MASTERTRANSAKSI.NOTRANS = DETAILTRANSAKSI.NOTRANS WHERE KODEBARANG = '" & A & "'", APREAL)
APRIL.Rows.Clear()
adapter.Fill(april)
adapter.Dispose()
DGVB_001.DataSource = april
End Sub
Private Sub Form25B_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Public Class Form26A_36109001
BalasHapusDim APREAL As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim APRIL As New DataTable
Private Sub Latihan26A_36109005_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select*from Barang", APREAL)
APRIL.Rows.Clear()
adapter.Fill(APRIL)
adapter.Dispose()
dgv01_36109001.DataSource = APRIL
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1_36109001.Click
If Form26B_36109001.Visible = False Then
Form26B_36109001.Show()
Else : Form26B_36109001.Activate()
End If
Form26B_36109001.KB1_001.Text = dgv01_36109001.CurrentRow.Cells("KodeBarang").Value
Form26B_36109001.NB1_001.Text = dgv01_36109001.CurrentRow.Cells("NamaBarang").Value
Form26B_36109001.HJ1_001.Text = dgv01_36109001.CurrentRow.Cells("PersediaanAwal").Value
Form26B_36109001.JB1_001.Text = dgv01_36109001.CurrentRow.Cells("HargaJual").Value
Form26B_36109001.ninja(Form26B_36109001.KB1_001.Text)
End Sub
End Class
Public Class Form26B_36109001
Dim APREAL As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim APRIL As New DataTable
Public Sub ninja(ByVal A As String)
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, MASTERTRANSAKSI.KETERANGAN, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, [DETAILTRANSAKSI]![UNIT]*[DETAILTRANSAKSI]![HARGA] AS Jumlah FROM MASTERTRANSAKSI INNER JOIN DETAILTRANSAKSI ON MASTERTRANSAKSI.NOTRANS = DETAILTRANSAKSI.NOTRANS WHERE KODEBARANG = '" & A & "'", APREAL)
APRIL.Rows.Clear()
adapter.Fill(APRIL)
adapter.Dispose()
DGV1_001.DataSource = APRIL
Dim tu As Integer
Dim total As Integer
For Each baris As DataRow In APRIL.Rows
tu = tu + baris("UNIT")
total = total + baris("JUMLAH")
Next
TU_001.Text = tu
TJ_001.Text = total
End Sub
Private Sub Form26B_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Latihan 23A
BalasHapusPublic Class Latihan23A
Dim NINI_DT As New DataTable
Dim NINI_36109008 As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Private Sub KLIK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button_36109008.Click
If Latihan23B.Visible = False Then
Latihan23B.Show()
Else
Latihan23B.Activate()
End If
Latihan23B.NO_36109008.Text = DGV_36109008.CurrentRow.Cells("NOTRANS").Value
Latihan23B.DTP_36109008.Value = DGV_36109008.CurrentRow.Cells("TANGGALTRANSAKSI").Value
Latihan23B.JNS_36109008.Text = DGV_36109008.CurrentRow.Cells("JENISTRANSAKSI").Value
Latihan23B.ANISA(Latihan23B.NO_36109008.Text)
End Sub
Private Sub Latihan23A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim np_36109008 As New OleDb.OleDbDataAdapter
np_36109008 = New OleDb.OleDbDataAdapter("select * From MASTERTRANSAKSI", NINI_36109008)
NINI_DT.Rows.Clear()
np_36109008.Fill(NINI_DT)
np_36109008.Dispose()
DGV_36109008.DataSource = NINI_DT
End Sub
End Class
Latihan 23B
Public Class Latihan23B
Dim NINI_DT As New DataTable
Dim NINI_36109008 As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Public Sub ANISA(ByVal NISA As String)
Dim np1_36109008 As New OleDb.OleDbDataAdapter
np1_36109008 = New OleDb.OleDbDataAdapter("select * From DETAILTRANSAKSI Where NOTRANS='" & NISA & "'", NINI_36109008)
NINI_DT.Rows.Clear()
np1_36109008.Fill(NINI_DT)
np1_36109008.Dispose()
DGV_36109008.DataSource = NINI_DT
End Sub
Private Sub Latihan23B_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Latihan 24A
BalasHapusPublic Class Latihan24A
Dim NINI_DT As New DataTable
Dim NINI_36109008 As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Private Sub Latihan24A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim np_36109008 As New OleDb.OleDbDataAdapter
np_36109008 = New OleDb.OleDbDataAdapter("select * From BARANG", NINI_36109008)
NINI_DT.Rows.Clear()
np_36109008.Fill(NINI_DT)
np_36109008.Dispose()
DGV_36109008.DataSource = NINI_DT
End Sub
Private Sub button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button_36109008.Click
If Latihan24B.Visible = False Then
Latihan24B.Show()
Else
Latihan24B.Activate()
End If
Latihan24B.KB_36109008.Text = DGV_36109008.CurrentRow.Cells("KODEBARANG").Value
Latihan24B.NB_36109008.Text = DGV_36109008.CurrentRow.Cells("NAMABARANG").Value
Latihan24B.HJ_36109008.Text = DGV_36109008.CurrentRow.Cells("HARGAJUAL").Value
Latihan24B.JB_36109008.Text = DGV_36109008.CurrentRow.Cells("PERSEDIAANAWAL").Value
Latihan24B.ANISA(Latihan24B.KB_36109008.Text)
End Sub
End Class
Latihan 24B
Public Class Latihan24B
Dim NINI_DT As New DataTable
Dim NINI_36109008 As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Public Sub ANISA(ByVal NISA As String)
Dim np1_36109008 As New OleDb.OleDbDataAdapter
np1_36109008 = New OleDb.OleDbDataAdapter("select * From DETAILTRANSAKSI Where KODEBARANG='" & NISA & "'", NINI_36109008)
NINI_DT.Rows.Clear()
np1_36109008.Fill(NINI_DT)
np1_36109008.Dispose()
DGV_36109008.DataSource = NINI_DT
End Sub
Private Sub Latihan24B_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Latihan 25A
BalasHapusPublic Class Latihan25A
Dim NINI_DT As New DataTable
Dim NINI_36109008 As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Private Sub Latihan25A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim np_36109008 As New OleDb.OleDbDataAdapter
np_36109008 = New OleDb.OleDbDataAdapter("select * From BARANG", NINI_36109008)
NINI_DT.Rows.Clear()
np_36109008.Fill(NINI_DT)
np_36109008.Dispose()
DGV_36109008.DataSource = NINI_DT
End Sub
Private Sub button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button_36109008.Click
If Latihan25B.Visible = False Then
Latihan25B.Show()
Else
Latihan25B.Activate()
End If
Latihan25B.KB_36109008.Text = DGV_36109008.CurrentRow.Cells("KODEBARANG").Value
Latihan25B.NB_36109008.Text = DGV_36109008.CurrentRow.Cells("NAMABARANG").Value
Latihan25B.HJ_36109008.Text = DGV_36109008.CurrentRow.Cells("HARGAJUAL").Value
Latihan25B.JB_36109008.Text = DGV_36109008.CurrentRow.Cells("PERSEDIAANAWAL").Value
Latihan25B.ANISA(Latihan25B.KB_36109008.Text)
End Sub
End Class
Latihan 25B
Public Class Latihan25B
Dim NINI_DT As New DataTable
Dim NINI_36109008 As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Public Sub ANISA(ByVal NISA As String)
Dim np1_36109008 As New OleDb.OleDbDataAdapter
np1_36109008 = New OleDb.OleDbDataAdapter("select MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, MASTERTRANSAKSI.KETERANGAN, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, [DETAILTRANSAKSI]![UNIT]*[DETAILTRANSAKSI]![HARGA] AS JUMLAH FROM DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS = MASTERTRANSAKSI.NOTRANS WHERE KODEBARANG = '" & NISA & "'", NINI_36109008)
NINI_DT.Rows.Clear()
np1_36109008.Fill(NINI_DT)
np1_36109008.Dispose()
DGV_36109008.DataSource = NINI_DT
End Sub
Private Sub Latihan25B_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Latihan 26A
BalasHapusPublic Class Latihan26A
Dim NINI_DT As New DataTable
Dim NINI_36109008 As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Private Sub Latihan26A_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim np_36109008 As New OleDb.OleDbDataAdapter
np_36109008 = New OleDb.OleDbDataAdapter("select * From BARANG", NINI_36109008)
NINI_DT.Rows.Clear()
np_36109008.Fill(NINI_DT)
np_36109008.Dispose()
DGV_36109008.DataSource = NINI_DT
End Sub
Private Sub button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button_36109008.Click
If Latihan26B.Visible = False Then
Latihan26B.Show()
Else
Latihan26B.Activate()
End If
Latihan26B.KB_36109008.Text = DGV_36109008.CurrentRow.Cells("KODEBARANG").Value
Latihan26B.NB_36109008.Text = DGV_36109008.CurrentRow.Cells("NAMABARANG").Value
Latihan26B.HJ_36109008.Text = DGV_36109008.CurrentRow.Cells("HARGAJUAL").Value
Latihan26B.JB_36109008.Text = DGV_36109008.CurrentRow.Cells("PERSEDIAANAWAL").Value
Latihan26B.ANISA(Latihan26B.KB_36109008.Text)
End Sub
End Class
Latihan 26B
Public Class Latihan26B
Dim NINI_DT As New DataTable
Dim NINI_36109008 As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Public Sub ANISA(ByVal NISA As String)
Dim np1_36109008 As New OleDb.OleDbDataAdapter
np1_36109008 = New OleDb.OleDbDataAdapter("select MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, MASTERTRANSAKSI.KETERANGAN, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA, [DETAILTRANSAKSI]![UNIT]*[DETAILTRANSAKSI]![HARGA] AS JUMLAH FROM DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS = MASTERTRANSAKSI.NOTRANS WHERE KODEBARANG = '" & NISA & "'", NINI_36109008)
NINI_DT.Rows.Clear()
np1_36109008.Fill(NINI_DT)
np1_36109008.Dispose()
DGV_36109008.DataSource = NINI_DT
Dim nini1_36109008 As Integer
Dim nini2_36109008 As Integer
For Each queen As DataRow In NINI_DT.Rows
nini1_36109008 = nini1_36109008 + queen("Unit")
nini2_36109008 = nini2_36109008 + queen("Jumlah")
Next
TU_36109008.Text = nini1_36109008
TJ_36109008.Text = nini2_36109008
End Sub
Private Sub Latihan26B_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
361 09 022
BalasHapusPublic Class Form23
Dim Ami_DT_36109022 As New DataTable
Dim rahmi_36109022 As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Private Sub klik_36109022_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles klik_36109022.Click
If Form23B.Visible = False Then
Form23B.Show()
Else
Form23B.Activate()
End If
Form23B.no_36109022.Text = tampil_36109022.CurrentRow.Cells("NOTRANS").Value
Form23B.tanggal_36109022.Value = tampil_36109022.CurrentRow.Cells("TANGGALTRANSAKSI").Value
Form23B.jenis_36109022.Text = tampil_36109022.CurrentRow.Cells("JENISTRANSAKSI").Value
Form23B.Aya(Form23B.no_36109022.Text)
End Sub
Private Sub Form23_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim am_36109022 As New OleDb.OleDbDataAdapter
Dim aL_36109022 As New OleDb.OleDbDataAdapter
aL_36109022 = New OleDb.OleDbDataAdapter("select * From MASTERTRANSAKSI", rahmi_36109022)
Ami_DT_36109022.Rows.Clear()
aL_36109022.Fill(Ami_DT_36109022)
aL_36109022.Dispose()
tampil_36109022.DataSource = Ami_DT_36109022
End Sub
End Class
Public Class Form23B
Dim ami_dt_36109022 As New DataTable
Dim rahmi_36109022 As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Public Sub Aya(ByVal JHUJHA As String)
Dim aL1_36109022 As New OleDb.OleDbDataAdapter
aL1_36109022 = New OleDb.OleDbDataAdapter("select * From DETAILTRANSAKSI Where NOTRANS='" & JHUJHA & "'", rahmi_36109022)
ami_dt_36109022.Rows.Clear()
aL1_36109022.Fill(ami_dt_36109022)
aL1_36109022.Dispose()
tampil_36109022.DataSource = ami_dt_36109022
End Sub
Private Sub Form23B_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Public Class Form24
Dim Ami_DT_36109022 As New DataTable
Dim rahmi_36109022 As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DataTransaksiJualBeli.accdb'")
Private Sub Form24_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim am_36109022 As New OleDb.OleDbDataAdapter
Dim aL_36109022 As New OleDb.OleDbDataAdapter
aL_36109022 = New OleDb.OleDbDataAdapter("select * From BARANG", rahmi_36109022)
Ami_DT_36109022.Rows.Clear()
aL_36109022.Fill(Ami_DT_36109022)
aL_36109022.Dispose()
tampil_36109022.DataSource = Ami_DT_36109022
End Sub
Private Sub klik_36109022_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles klik_36109022.Click
If Form24B.Visible = False Then
Form24B.Show()
Else
Form24B.Activate()
End If
Ismi Febriani Asyikin
BalasHapus3a D3
361 09 005
http://ismifebriani.blogspot.com/2011/11/apkom-4-latihan-23-26.html
http://aminurul.blogspot.com/2011/11/form-22-26b.html
BalasHapusANDI WAHYUNI
BalasHapus361 09 019
http://wahyunistrongggg.blogspot.com/2011/11/latihan-20-26-apkom-4.html