latihan 23A
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
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
Tidak ada komentar:
Posting Komentar