Public Class Latihan44_46109010 Dim hubung As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\data grafik.accdb") Dim faradillah As New DataTable
Private Sub latihan44_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim fara As New OleDb.OleDbDataAdapter fara = New OleDb.OleDbDataAdapter("select * from QPembelianPerBulanan", hubung) faradillah.Rows.Clear() fara.Fill(faradillah) dtg46109010.DataSource = faradillah fara.Dispose()
'membentuk jumlah baris dan jumlah kolo grafik yang akan dibuat' chart46109010.RowCount = faradillah.Rows.Count chart46109010.ColumnCount = 3
'memasukkan data ke setiap baris dan setiap kolom dari data table faradillah'
Dim posisibarisgrafik As Integer = 0 For Each barisX As DataRow In faradillah.Rows posisibarisgrafik = posisibarisgrafik + 1
chart46109010.Column = 3 chart46109010.Data = barisX("JUMLAH") / 10000 Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click chart46109010.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click chart46109010.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click chart46109010.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click chart46109010.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click chart46109010.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
Dim Yusri As New OleDb.OleDbConnection("provider=Microsoft.ACE.OleDb.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb") Dim Kaka As New DataTable
Private Sub Latihan44_46109038_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Rhey = New OleDb.OleDbDataAdapter("select*from QPembelianPerBulanan", Yusri) Kaka.Rows.Clear()
Private Sub Batang_46109038_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Batang_46109038.Click Chart_46109038.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar End Sub
Private Sub Line_46109038_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Line_46109038.Click Chart_46109038.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
End Sub
Private Sub Lingkaran_46109038_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Lingkaran_46109038.Click Chart_46109038.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
End Sub
Private Sub Batang3D_46109038_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Batang3D_46109038.Click Chart_46109038.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
End Sub
Private Sub Line3D_46109038_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Line3D_46109038.Click Chart_46109038.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine End Sub End Class
Public Class Latihan44_46109010 Dim hubung As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\data grafik.accdb") Dim wawan As New DataTable
Private Sub latihan44_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim riswan As New OleDb.OleDbDataAdapter riswan = New OleDb.OleDbDataAdapter("select * from QPembelianPerBulanan", hubung) wawan.Rows.Clear() riswan.Fill(wawan) data46109002.DataSource = wawan fara.Dispose()
'membentuk jumlah baris dan jumlah kolo grafik yang akan dibuat' chart46109002.RowCount = wawan.Rows.Count chart46109002.ColumnCount = 3
'memasukkan data ke setiap baris dan setiap kolom dari data table wawan'
Dim posisibarisgrafik As Integer = 0 For Each barisX As DataRow In wawan.Rows posisibarisgrafik = posisibarisgrafik + 1
chart46109002.Column = 3 chart46109002.Data = barisX("JUMLAH") / 10000 Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click chart46109002.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click chart46109002.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click chart46109002.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click chart46109002.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click chart46109002.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
Public Class LATIHAN44_46109035 Dim diaz As New DataTable Dim diah As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb")
Private Sub LATIHAN44_46109035_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 QpembelianPerBulanan", diah) a.Fill(diaz) diaz_46109035.DataSource = diaz a.Dispose()
'membuat jumlah baris dan jumlah kolom grafik yang akan dibuat diahasrini.RowCount = diaz.Rows.Count() diahasrini.ColumnCount = 3
'memasukkan data ke setiap baris dan setiap kolom dari Data Tdiahel QpembelianPerBulanan Dim asal As Integer = 0
For Each BarisX As DataRow In diaz.Rows asal =b + 1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click diahasrini.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click diahasrini.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click diahasrini.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click diahasrini.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click diahasrini.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine End Sub End Class
Public Class Latihan4446109047 Dim hubung As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\data grafik.accdb") Dim Muhitha As New DataTable
Private Sub latihan4446109047_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim itha As New OleDb.OleDbDataAdapter itha = New OleDb.OleDbDataAdapter("select * from QPembelianPerBulanan", hubung) Muhitha.Rows.Clear() itha.Fill(Muhitha) DGV46109047.DataSource = Muhitha itha.Dispose()
'membentuk jumlah baris dan jumlah kolo grafik yang akan dibuat' chart46109047.RowCount = Muhitha.Rows.Count chart46109047.ColumnCount = 3
'memasukkan data ke setiap baris dan setiap kolom dari data table Muhitha'
Dim posisibarisgrafik As Integer = 0 For Each barisX As DataRow In Muhitha.Rows posisibarisgrafik = posisibarisgrafik + 1
chart46109047.Column = 3 chart46109047.Data = barisX("JUMLAH") / 10000 Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click chart46109047.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click chart46109047.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click chart46109047.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click chart46109047.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click chart46109047.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
Public Class Latihan_044_46109006 Dim conect As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/DATA GRAFIK.ACCDB") Dim SRY As New DataTable
Private Sub Latihan_044_46109006_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 qpembelianperbulanan", conect) SRY.Rows.Clear() a.Fill(SRY) a.Dispose()
GR46109006.Column = 3 GR46109006.Data = x("jumlah") / 10000 Next End Sub
Private Sub GB46109006_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GB46109006.Click GR46109006.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar End Sub
Private Sub GL46109006_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GL46109006.Click GR46109006.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine End Sub
Private Sub GK46109006_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GK46109006.Click GR46109006.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie End Sub
Private Sub GT46109006_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GT46109006.Click GR46109006.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar End Sub
Private Sub GE46109006_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GE46109006.Click GR46109006.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine End Sub End Class
Public Class Latihan044_46109015 Dim conect As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/DATA GRAFIK.ACCDB") Dim imah As New DataTable
Private Sub Latihan044_46109015_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 qpembelianperbulanan", conect) imah.Rows.Clear() a.Fill(imah) a.Dispose()
GR46109015.Column = 3 GR46109015.Data = x("jumlah") / 10000 Next End Sub
Private Sub GB46109015_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GB46109015.Click GR46109015.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar End Sub
Private Sub GL46109015_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GL46109015.Click GR46109015.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine End Sub
Private Sub GK46109015_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GK46109015.Click GR46109015.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie End Sub
Private Sub GT46109015_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GT46109015.Click GR46109015.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar End Sub
Private Sub GE46109015_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GE46109015.Click GR46109015.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine End Sub End Class
Public Class Latihan44_46109050 Dim hubung As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\data grafik.accdb") Dim risky As New DataTable
Private Sub Latihan44_46109050_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim kiki As New OleDb.OleDbDataAdapter kiki = New OleDb.OleDbDataAdapter("select * from QPembelianPerBulanan", hubung) risky.Rows.Clear() kiki.Fill(risky) dtg46109050.DataSource = risky kiki.Dispose()
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click chart46109050.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click chart46109050.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click chart46109050.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click chart46109050.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
Public Class Latihan4446109026 Dim hubung As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\data grafik.accdb") Dim ibeng As New DataTable
Private Sub Latihan4446109026_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ibhe As New OleDb.OleDbDataAdapter ibhe = New OleDb.OleDbDataAdapter("select * from QPembelianPerBulanan", hubung) ibeng.Rows.Clear() ibhe.Fill(ibeng) dtg46109026.DataSource = ibeng ibhe.Dispose()
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click chart46109026.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click chart46109026.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click chart46109026.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click chart46109026.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
FARADILLAH AMALIA RIVAI
BalasHapusLATIHAN 44
Public Class Latihan44_46109010
Dim hubung As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\data grafik.accdb")
Dim faradillah As New DataTable
Private Sub latihan44_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim fara As New OleDb.OleDbDataAdapter
fara = New OleDb.OleDbDataAdapter("select * from QPembelianPerBulanan", hubung)
faradillah.Rows.Clear()
fara.Fill(faradillah)
dtg46109010.DataSource = faradillah
fara.Dispose()
'membentuk jumlah baris dan jumlah kolo grafik yang akan dibuat'
chart46109010.RowCount = faradillah.Rows.Count
chart46109010.ColumnCount = 3
'memasukkan data ke setiap baris dan setiap kolom dari data table faradillah'
Dim posisibarisgrafik As Integer = 0
For Each barisX As DataRow In faradillah.Rows
posisibarisgrafik = posisibarisgrafik + 1
chart46109010.Row = posisibarisgrafik
chart46109010.RowLabel = barisX("BULAN")
chart46109010.Column = 1
chart46109010.Data = barisX("UNIT")
chart46109010.Column = 2
chart46109010.Data = barisX("RATA-RATA HARGA") / 1000
chart46109010.Column = 3
chart46109010.Data = barisX("JUMLAH") / 10000
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
chart46109010.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
chart46109010.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
chart46109010.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
chart46109010.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
chart46109010.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
End Sub
End Class
andi muh. yusri
BalasHapusPublic Class Latihan44_46109038
Dim Yusri As New OleDb.OleDbConnection("provider=Microsoft.ACE.OleDb.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb")
Dim Kaka As New DataTable
Private Sub Latihan44_46109038_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Rhey = New OleDb.OleDbDataAdapter("select*from QPembelianPerBulanan", Yusri)
Kaka.Rows.Clear()
Rhey.Fill(Kaka)
DGV_46109038.DataSource = Kaka
Rhey.Dispose()
Chart_46109038.RowCount = Kaka.Rows.Count()
Chart_46109038.ColumnCount = 3
Dim PosisiBarisGrafik As Integer = 0
For Each BarisX As DataRow In Kaka.Rows
PosisiBarisGrafik = PosisiBarisGrafik + 1
Chart_46109038.Row = PosisiBarisGrafik
Chart_46109038.RowLabel = BarisX("BULAN")
Chart_46109038.Column = 1
Chart_46109038.Data = BarisX("UNIT")
Chart_46109038.Column = 1
Chart_46109038.Data = BarisX("RATA-RATA HARGA") / 1000
Chart_46109038.Column = 2
Chart_46109038.Data = BarisX("JUMLAH") / 1000
Next
End Sub
Private Sub Batang_46109038_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Batang_46109038.Click
Chart_46109038.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
End Sub
Private Sub Line_46109038_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Line_46109038.Click
Chart_46109038.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
End Sub
Private Sub Lingkaran_46109038_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Lingkaran_46109038.Click
Chart_46109038.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
End Sub
Private Sub Batang3D_46109038_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Batang3D_46109038.Click
Chart_46109038.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
End Sub
Private Sub Line3D_46109038_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Line3D_46109038.Click
Chart_46109038.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
End Sub
End Class
Public Class Latihan44_46109010
BalasHapusDim hubung As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\data grafik.accdb")
Dim wawan As New DataTable
Private Sub latihan44_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim riswan As New OleDb.OleDbDataAdapter
riswan = New OleDb.OleDbDataAdapter("select * from QPembelianPerBulanan", hubung)
wawan.Rows.Clear()
riswan.Fill(wawan)
data46109002.DataSource = wawan
fara.Dispose()
'membentuk jumlah baris dan jumlah kolo grafik yang akan dibuat'
chart46109002.RowCount = wawan.Rows.Count
chart46109002.ColumnCount = 3
'memasukkan data ke setiap baris dan setiap kolom dari data table wawan'
Dim posisibarisgrafik As Integer = 0
For Each barisX As DataRow In wawan.Rows
posisibarisgrafik = posisibarisgrafik + 1
chart46109002.Row = posisibarisgrafik
chart46109002.RowLabel = barisX("BULAN")
chart46109002.Column = 1
chart46109002.Data = barisX("UNIT")
chart46109002.Column = 2
chart46109002.Data = barisX("RATA-RATA HARGA") / 1000
chart46109002.Column = 3
chart46109002.Data = barisX("JUMLAH") / 10000
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
chart46109002.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
chart46109002.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
chart46109002.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
chart46109002.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
chart46109002.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
End Sub
End Class
Komentar ini telah dihapus oleh pengarang.
BalasHapusKomentar ini telah dihapus oleh pengarang.
BalasHapusPublic Class LATIHAN44_46109035
BalasHapusDim diaz As New DataTable
Dim diah As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb")
Private Sub LATIHAN44_46109035_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 QpembelianPerBulanan", diah)
a.Fill(diaz)
diaz_46109035.DataSource = diaz
a.Dispose()
'membuat jumlah baris dan jumlah kolom grafik yang akan dibuat
diahasrini.RowCount = diaz.Rows.Count()
diahasrini.ColumnCount = 3
'memasukkan data ke setiap baris dan setiap kolom dari Data Tdiahel QpembelianPerBulanan
Dim asal As Integer = 0
For Each BarisX As DataRow In diaz.Rows
asal =b + 1
diahasrini.Row =b
diahasrini.RowLdiahel = BarisX("BULAN")
diahasrini.Column = 1
diahasrini.Data = BarisX("UNIT")
diahasrini.Column = 2
diahasrini.Data = BarisX("RATA-RATA HARGA") / 1000
diahasrini.Column = 3
diahasrini.Data = BarisX("JUMLAH") / 1000
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
diahasrini.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
diahasrini.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
diahasrini.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
diahasrini.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
diahasrini.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
End Sub
End Class
Andi Nurmuhitha (461 09 047)
BalasHapusLATIHAN 44
Public Class Latihan4446109047
Dim hubung As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\data grafik.accdb")
Dim Muhitha As New DataTable
Private Sub latihan4446109047_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim itha As New OleDb.OleDbDataAdapter
itha = New OleDb.OleDbDataAdapter("select * from QPembelianPerBulanan", hubung)
Muhitha.Rows.Clear()
itha.Fill(Muhitha)
DGV46109047.DataSource = Muhitha
itha.Dispose()
'membentuk jumlah baris dan jumlah kolo grafik yang akan dibuat'
chart46109047.RowCount = Muhitha.Rows.Count
chart46109047.ColumnCount = 3
'memasukkan data ke setiap baris dan setiap kolom dari data table Muhitha'
Dim posisibarisgrafik As Integer = 0
For Each barisX As DataRow In Muhitha.Rows
posisibarisgrafik = posisibarisgrafik + 1
chart46109047.Row = posisibarisgrafik
chart46109047.RowLabel = barisX("BULAN")
chart46109047.Column = 1
chart46109047.Data = barisX("UNIT")
chart46109047.Column = 2
chart46109047.Data = barisX("RATA-RATA HARGA") / 1000
chart46109047.Column = 3
chart46109047.Data = barisX("JUMLAH") / 10000
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
chart46109047.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
chart46109047.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
chart46109047.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
chart46109047.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
chart46109047.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
End Sub
End Class
Public Class Latihan_044_46109006
BalasHapusDim conect As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/DATA GRAFIK.ACCDB")
Dim SRY As New DataTable
Private Sub Latihan_044_46109006_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 qpembelianperbulanan", conect)
SRY.Rows.Clear()
a.Fill(SRY)
a.Dispose()
DATA46109006.DataSource = SRY
GR46109006.ColumnCount = 3
GR46109006.RowCount = SRY.Rows.Count
Dim tingting As Integer = 0
For Each x As DataRow In SRY.Rows
tingting += 1
GR46109006.Row = tingting
GR46109006.RowLabel = x("bulan")
GR46109006.Column = 1
GR46109006.Data = x("unit")
GR46109006.Column = 2
GR46109006.Data = x("rata-rata harga") / 1000
GR46109006.Column = 3
GR46109006.Data = x("jumlah") / 10000
Next
End Sub
Private Sub GB46109006_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GB46109006.Click
GR46109006.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
End Sub
Private Sub GL46109006_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GL46109006.Click
GR46109006.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
End Sub
Private Sub GK46109006_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GK46109006.Click
GR46109006.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
End Sub
Private Sub GT46109006_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GT46109006.Click
GR46109006.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
End Sub
Private Sub GE46109006_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GE46109006.Click
GR46109006.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
End Sub
End Class
Public Class Latihan044_46109015
BalasHapusDim conect As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/DATA GRAFIK.ACCDB")
Dim imah As New DataTable
Private Sub Latihan044_46109015_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 qpembelianperbulanan", conect)
imah.Rows.Clear()
a.Fill(imah)
a.Dispose()
DATA46109015.DataSource = imah
GR46109015.ColumnCount = 3
GR46109015.RowCount = imah.Rows.Count
Dim tingting As Integer = 0
For Each x As DataRow In imah.Rows
tingting += 1
GR46109015.Row = tingting
GR46109015.RowLabel = x("bulan")
GR46109015.Column = 1
GR46109015.Data = x("unit")
GR46109015.Column = 2
GR46109015.Data = x("rata-rata harga") / 1000
GR46109015.Column = 3
GR46109015.Data = x("jumlah") / 10000
Next
End Sub
Private Sub GB46109015_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GB46109015.Click
GR46109015.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
End Sub
Private Sub GL46109015_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GL46109015.Click
GR46109015.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
End Sub
Private Sub GK46109015_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GK46109015.Click
GR46109015.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
End Sub
Private Sub GT46109015_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GT46109015.Click
GR46109015.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
End Sub
Private Sub GE46109015_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GE46109015.Click
GR46109015.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
End Sub
End Class
Public Class Latihan44_46109050
BalasHapusDim hubung As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\data grafik.accdb")
Dim risky As New DataTable
Private Sub Latihan44_46109050_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim kiki As New OleDb.OleDbDataAdapter
kiki = New OleDb.OleDbDataAdapter("select * from QPembelianPerBulanan", hubung)
risky.Rows.Clear()
kiki.Fill(risky)
dtg46109050.DataSource = risky
kiki.Dispose()
chart46109050.RowCount = risky.Rows.Count
chart46109050.ColumnCount = 3
Dim posisibarisgrafik As Integer = 0
For Each barisX As DataRow In risky.Rows
posisibarisgrafik = posisibarisgrafik + 1
chart46109050.Row = posisibarisgrafik
chart46109050.RowLabel = barisX("BULAN")
chart46109050.Column = 1
chart46109050.Data = barisX("UNIT")
chart46109050.Column = 2
chart46109050.Data = barisX("RATA-RATA HARGA") / 1000
chart46109050.Column = 3
chart46109050.Data = barisX("JUMLAH") / 10000
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
chart46109050.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
chart46109050.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
chart46109050.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
chart46109050.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
chart46109050.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
End Sub
End Class
Public Class Latihan4446109026
BalasHapusDim hubung As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\data grafik.accdb")
Dim ibeng As New DataTable
Private Sub Latihan4446109026_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ibhe As New OleDb.OleDbDataAdapter
ibhe = New OleDb.OleDbDataAdapter("select * from QPembelianPerBulanan", hubung)
ibeng.Rows.Clear()
ibhe.Fill(ibeng)
dtg46109026.DataSource = ibeng
ibhe.Dispose()
chart46109026.RowCount = ibeng.Rows.Count
chart46109026.ColumnCount = 3
Dim posisibarisgrafik As Integer = 0
For Each barisX As DataRow In ibeng.Rows
posisibarisgrafik = posisibarisgrafik + 1
chart46109026.Row = posisibarisgrafik
chart46109026.RowLabel = barisX("BULAN")
chart46109026.Column = 1
chart46109026.Data = barisX("UNIT")
chart46109026.Column = 2
chart46109026.Data = barisX("RATA-RATA HARGA") / 1000
chart46109026.Column = 3
chart46109026.Data = barisX("JUMLAH") / 10000
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
chart46109026.chartType = MSChart20Lib.VtChChartType.VtChChartType2dBar
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
chart46109026.chartType = MSChart20Lib.VtChChartType.VtChChartType2dLine
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
chart46109026.chartType = MSChart20Lib.VtChChartType.VtChChartType2dPie
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
chart46109026.chartType = MSChart20Lib.VtChChartType.VtChChartType3dBar
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
chart46109026.chartType = MSChart20Lib.VtChChartType.VtChChartType3dLine
End Sub
End Class