DISKRIPSI LATIHAN 21
Latihan_21_36110030
A.
Object dalam Latihan_21_36110030 :
Hanya ada
satu object dalam Latihan_21_36110030, yaitu object DataGridView sebanyak
dua.
B.
Script Unique
Untuk script, dapat diliat secara
lebih lengkap pada Prosedur Penyelesaian Latihan_21_36110030.
C.
Even
Latihan_21_36110030_Load
PROSEDUR PENYELESAIAN LATIHAN 21
1.KLIK STAR KEMUDIAN PILIH
MICROSOFT VISUAL STUDIO 2008
2.KEMUDIAN KLIK NEW PROJECT PADA FILE
3.KEMUDIAN KLIK ADD UNTUK MENAMBAHKAN PROJECT
4. KEMUDIAN BUATLAH FORM SEPERTI DIBAWAH INI :
5.KEMUDIAN MASUKAN RUMUS :
Public Class Latihan_21_36110030
Dim Koneksi
As New
OleDb.OleDbConnection(" Provider =
microsoft.ace.oledb.12.0; data source = E:\semester 5\Apkom 4\LATIHAN 15-26
MENGAKSES DATA\DataTransaksiJualBeli.accdb")
Dim DtTable
As New
DataTable
Dim
DtTable2 As New
DataTable
Dim Data As New DataSet
Dim Binding
As New
BindingSource
Dim
Binding2 As New
BindingSource
Private Sub Latihan_21_36110030_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)
DtTable.Rows.Clear()
Adapter.Fill(DtTable)
dgv1_36110030.DataSource = DtTable
Adapter = New
OleDb.OleDbDataAdapter("Select * "
& _
"From
Detailtransaksi", Koneksi)
DtTable2.Rows.Clear()
Adapter.Fill(DtTable2)
dgv2_36110030.DataSource = DtTable2
Adapter.Dispose()
Data.Tables.Add(DtTable)
Data.Tables.Add(DtTable2)
DtTable.TableName = "Induk"
DtTable2.TableName = "Sub"
Data.Relations.Add(New DataRelation("Relasi",
Data.Tables("Induk").Columns("Notrans"), Data.Tables("Sub").Columns("Notrans")))
Binding.DataSource = Data
Binding.DataMember = "Induk"
Binding2.DataSource = Binding
Binding2.DataMember = "Relasi"
dgv1_36110030.DataSource = Binding
dgv2_36110030.DataSource = Binding2
End Sub
Private Sub dgv2_36110030_CellContentClick(ByVal sender As
System.Object, ByVal e As
System.Windows.Forms.DataGridViewCellEventArgs) Handles
dgv2_36110030.CellContentClick
End Sub
End Class
6. KEMUDIAN
UJI PROGRAM
7. JIKA SUDAH BERHASIL
Save program anda
8.SELESAI
0 komentar:
Posting Komentar