LATIHAN 42
Public Class Latihan42_36109005
Dim ISMI As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\Data Grafik.accdb")
Dim DT As New DataTable
Private Sub Latihan42_36109005_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ICHMI As New OleDb.OleDbDataAdapter
ICHMI = New OleDb.OleDbDataAdapter("select * from qrekapperrekening", ISMI)
DT.Rows.Clear()
ICHMI.Fill(DT)
DGV_36109005.DataSource = DT
ICHMI.Dispose()
Grafik_36109005.ColumnCount = 2
Grafik_36109005.RowCount = DT.Rows.Count
Dim POSISIBARIS As Integer = 0
For Each x As DataRow In DT.Rows
POSISIBARIS = POSISIBARIS + 1
Grafik_36109005.Row = POSISIBARIS
Grafik_36109005.RowLabel = x("koderekening")
Grafik_36109005.Column = 1
Grafik_36109005.Data = x("total debet") / 1000
Grafik_36109005.Column = 2
Grafik_36109005.Data = x("total kredit") / 1000
Next
End Sub
End Class
Dim ISMI As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\Data Grafik.accdb")
Dim DT As New DataTable
Private Sub Latihan42_36109005_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ICHMI As New OleDb.OleDbDataAdapter
ICHMI = New OleDb.OleDbDataAdapter("select * from qrekapperrekening", ISMI)
DT.Rows.Clear()
ICHMI.Fill(DT)
DGV_36109005.DataSource = DT
ICHMI.Dispose()
Grafik_36109005.ColumnCount = 2
Grafik_36109005.RowCount = DT.Rows.Count
Dim POSISIBARIS As Integer = 0
For Each x As DataRow In DT.Rows
POSISIBARIS = POSISIBARIS + 1
Grafik_36109005.Row = POSISIBARIS
Grafik_36109005.RowLabel = x("koderekening")
Grafik_36109005.Column = 1
Grafik_36109005.Data = x("total debet") / 1000
Grafik_36109005.Column = 2
Grafik_36109005.Data = x("total kredit") / 1000
Next
End Sub
End Class
Tidak ada komentar:
Posting Komentar