Form 23A
Public Class Form23A
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 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", koneksi)
tabel.Rows.Clear()
adapter.Fill(tabel)
adapter.Dispose()
dgv36109023.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.no36109023.Text = dgv36109023.CurrentRow.Cells("notrans").Value
Form23B.tgl36109023.Value = dgv36109023.CurrentRow.Cells("tanggaltransaksi").Value
Form23B.jenis36109023.Text = dgv36109023.CurrentRow.Cells("jenistransaksi").Value
Form23B.ame(Form23B.no36109023.Text)
End Sub
End Class
Form 23B
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 ame(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)
dgv36109023.DataSource = tabel
End Sub
End Class
Form 24A
Public Class Form24A
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 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", koneksi)
tabel.Rows.Clear()
adapter.Fill(tabel)
adapter.Dispose()
dgv36109023.DataSource = tabel
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.kode36109023.Text = dgv36109023.CurrentRow.Cells("KODEBARANG").Value
Form24B.nama36109023.Text = dgv36109023.CurrentRow.Cells("NAMABARANG").Value
Form24B.harga36109023.Text = dgv36109023.CurrentRow.Cells("PERSEDIAANAWAL").Value
Form24B.jumlah36109023.Text = dgv36109023.CurrentRow.Cells("HARGAJUAL").Value
Form24B.ame(Form24B.kode36109023.Text)
End Sub
End Class
Form 24B
Public Class Form24B
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 ame(ByVal A As String)
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select* from DETAILTRANSAKSI where KODEBARANG='" & A & "'", koneksi)
tabel.Rows.Clear()
adapter.Fill(tabel)
dgv36109023.DataSource = tabel
End Sub
End Class
Form 25A
Public Class Form25A
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 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", koneksi)
tabel.Rows.Clear()
adapter.Fill(tabel)
adapter.Dispose()
dgv36109023.DataSource = tabel
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.kode36109023.Text = dgv36109023.CurrentRow.Cells("KODEBARANG").Value
Form25B.nama36109023.Text = dgv36109023.CurrentRow.Cells("NAMABARANG").Value
Form25B.harga36109023.Text = dgv36109023.CurrentRow.Cells("HARGAJUAL").Value
Form25B.jumlah36109023.Text = dgv36109023.CurrentRow.Cells("PERSEDIAANAWAL").Value
Form25B.ame(Form25B.kode36109023.Text)
End Sub
End Class
Form 25B
Public Class Form25B
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim am As New DataTable
Public Sub ame(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 & "'", koneksi)
am.Rows.Clear()
adapter.Fill(am)
adapter.Dispose()
dgv36109023.DataSource = am
End Sub
End Class
Form 26A
Public Class Form26A
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 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", koneksi)
tabel.Rows.Clear()
adapter.Fill(tabel)
adapter.Dispose()
dgv36109023.DataSource = tabel
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.kode36109023.Text = dgv36109023.CurrentRow.Cells("KODEBARANG").Value
Form26B.nama36109023.Text = dgv36109023.CurrentRow.Cells("NAMABARANG").Value
Form26B.harga36109023.Text = dgv36109023.CurrentRow.Cells("HARGAJUAL").Value
Form26B.jumlah36109023.Text = dgv36109023.CurrentRow.Cells("PERSEDIAANAWAL").Value
Form26B.ame(Form26B.kode36109023.Text)
End Sub
End Class
Form 26B
Public Class Form26B
Dim koneksi As New OleDb.OleDbConnection("provider=microsoft.ACE.oledb.12.0;data source=" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim am As New DataTable
Public Sub ame(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 & "'", koneksi)
am.Rows.Clear()
adapter.Fill(am)
adapter.Dispose()
tw()
dgv36109023.DataSource = am
End Sub
Private Sub tw()
Dim TU As Integer
Dim TJ As Integer
For Each x As DataRow In am.Rows
TU = TU + x("Unit")
TJ = TJ + x("Jumlah")
Next
TU36109023.Text = tu
TJ36109023.Text = TJ
End Sub
End Class
0 komentar:
Posting Komentar