Jumat, 18 November 2011

Latihan 43 APKOM 4 D4A

31 komentar:

  1. Public Class Latihan_43_46109051
    'DEKLARASI CONECTION
    Dim wahdaniah As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\DATA GRAFIK.accdb;jet OLEDB:database password=thepinkers29")
    'deklarasi data tabel
    Dim niah As New DataTable
    Private Sub Latih43_46109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    'deklarasi adapter
    Dim wahda As New OleDb.OleDbDataAdapter
    wahda = New OleDb.OleDbDataAdapter("select * from qpembelianperjenisbarang", wahdaniah) 'mkemunculkan semua data dari tabel barang dalam acces DATA GRAFIK
    niah.Rows.Clear() 'membersihkan data tabel
    wahda.Fill(niah) 'mengisi database ke dalam data table
    dg_46109051.DataSource = niah 'memunculkan dalam datagridview

    wahda.Dispose() 'menghancurkan kendaraan (adapter) yang sudah terpakai

    'menentukan jumlah baris dalam datagridview
    grafik_46109051.ColumnCount = 3
    grafik_46109051.RowCount = niah.Rows.Count

    'menentukan posisi baris dalam datagridview
    Dim POSISIBARIS As Integer = 0

    For Each x As DataRow In niah.Rows
    POSISIBARIS = POSISIBARIS + 1
    grafik_46109051.Row = POSISIBARIS

    'memberi nama pada baris grafik dengan nama pada kolom tahun.
    grafik_46109051.RowLabel = x("kode barang")

    grafik_46109051.Column = 1
    grafik_46109051.Data = x("unit")

    grafik_46109051.Column = 2
    grafik_46109051.Data = x("rata-rata harga") / 1000

    grafik_46109051.Column = 3
    grafik_46109051.Data = x("jumlah") / 10000
    Next
    End Sub

    End Class

    BalasHapus
  2. Public Class Latihan43_46109045

    Dim Dewi As New OleDb.OleDbConnection("provider=Microsoft.ACE.OleDb.12.0;data source=" & Application.StartupPath & "\Data Grafik.accdb")
    Dim Dede As New DataTable

    Private Sub Latihan43_46109045_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    Dim Dede = New OleDb.OleDbDataAdapter("select*from QPembelianPerJenisBarang", Dewi)
    Dede.Rows.Clear()

    Dede.Fill(Dede)
    DGV_46109045.DataSource = Dede
    Dede.Dispose()

    Chart_46109045.RowCount = Dede.Rows.Count()
    Chart_46109045.ColumnCount = 3

    Dim PosisiBarisGrafik As Integer = 0
    For Each BarisX As DataRow In Dede.Rows
    PosisiBarisGrafik = PosisiBarisGrafik + 1

    Chart_46109045.Row = PosisiBarisGrafik
    Chart_46109045.RowLabel = BarisX("KODE BARANG")

    Chart_46109045.Column = 1
    Chart_46109045.Data = BarisX("UNIT")

    Chart_46109045.Column = 2
    Chart_46109045.Data = BarisX("RATA-RATA HARGA") / 1000


    Chart_46109045.Column = 3
    Chart_46109045.Data = BarisX("JUMLAH") / 1000

    Next

    End Sub
    End Class

    BalasHapus
  3. Public Class LATIHAN_043_46109001

    Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\DATA GRAFIK.accdb")

    Dim wiwi As New DataTable
    Private Sub Form6_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    Dim dwitya As New OleDb.OleDbDataAdapter
    dwitya = New OleDb.OleDbDataAdapter("select * from QPembelianPerJenisBarang", CONECT)
    wiwi.Rows.Clear()
    dwitya.Fill(wiwi)
    DATA46109001.DataSource = wiwi

    dwitya.Dispose()


    GR46109001.ColumnCount = 3
    GR46109001.RowCount = wiwi.Rows.Count


    Dim POSISIBARIS As Integer = 0

    For Each x As DataRow In wiwi.Rows
    POSISIBARIS = POSISIBARIS + 1
    GR46109001.Row = POSISIBARIS



    GR46109001.Row = POSISIBARIS
    GR46109001.RowLabel = x("KODE BARANG")

    GR46109001.Column = 1
    GR46109001.Data = x("UNIT")

    GR46109001.Column = 2
    GR46109001.Data = x("RATA-RATA HARGA") / 1000

    GR46109001.Column = 3
    GR46109001.Data = x("JUMLAH") / 10000

    Next
    End Sub
    End Class

    BalasHapus
  4. Public Class Latihan_43_46109005
    Dim fahrul As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\DATA GRAFIK.accdb;jet OLEDB:database password=arul")
    Dim arul As New DataTable
    Private Sub Latihan_41_46109005_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim mf As New OleDb.OleDbDataAdapter
    mf = New OleDb.OleDbDataAdapter("select * from qpembelianperjenisbarang", fahrul)
    arul.Rows.Clear()
    mf.Fill(arul)
    data46109005.DataSource = arul

    mf.Dispose()
    grafik46109005.ColumnCount = 2
    grafik46109005.RowCount = arul.Rows.Count

    Dim POSISIBARIS As Integer = 0

    For Each x As DataRow In arul.Rows
    POSISIBARIS = POSISIBARIS + 1
    grafik46109005.Row = POSISIBARIS

    grafik46109005.RowLabel = x("TAHUN")

    grafik46109005.Column = 1
    grafik46109005.Data = x("PENDAPATAN") / 1000

    grafik46109005.Column = 2
    grafik46109005.Data = x("BIAYA") / 1000

    Next
    End Sub

    End Class

    BalasHapus
  5. Public Class LATIHAN_043_46109017

    Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\DATA GRAFIK.accdb")

    Dim ayu As New DataTable
    Private Sub Form6_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    Dim wandika As New OleDb.OleDbDataAdapter
    wandika = New OleDb.OleDbDataAdapter("select * from QPembelianPerJenisBarang", CONECT)
    ayu.Rows.Clear()
    wandika.Fill(ayu)
    DATA46109017.DataSource = ayu

    wandika.Dispose()


    GR46109017.ColumnCount = 3
    GR46109017.RowCount = ayu.Rows.Count


    Dim POSISIBARIS As Integer = 0

    For Each x As DataRow In ayu.Rows
    POSISIBARIS = POSISIBARIS + 1
    GR46109017.Row = POSISIBARIS



    GR46109017.Row = POSISIBARIS
    GR46109017.RowLabel = x("KODE BARANG")

    GR46109017.Column = 1
    GR46109017.Data = x("UNIT")

    GR46109017.Column = 2
    GR46109017.Data = x("RATA-RATA HARGA") / 1000

    GR46109017.Column = 3
    GR46109017.Data = x("JUMLAH") / 10000

    Next
    End Sub
    End Class

    BalasHapus
  6. Public Class LATIHAN043_46109041

    Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\DATA GRAFIK.accdb")

    Dim joice As New DataTable
    Private Sub Form6_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    Dim natalina As New OleDb.OleDbDataAdapter
    natalina = New OleDb.OleDbDataAdapter("select * from QPembelianPerJenisBarang", CONECT)
    joice.Rows.Clear()
    natalina.Fill(joice)
    wonga_041.DataSource = joice

    natalina.Dispose()


    gr_041.ColumnCount = 3
    gr_041.RowCount = joice.Rows.Count


    Dim POSISIBARIS As Integer = 0

    For Each x As DataRow In joice.Rows
    POSISIBARIS = POSISIBARIS + 1
    gr_041.Row = POSISIBARIS



    gr_041.Row = POSISIBARIS
    gr_041.RowLabel = x("KODE BARANG")

    gr_041.Column = 1
    gr_041.Data = x("UNIT")

    gr_041.Column = 2
    gr_041.Data = x("RATA-RATA HARGA") / 1000

    gr_041.Column = 3
    gr_041.Data = x("JUMLAH") / 10000

    Next
    End Sub
    End Class

    BalasHapus
  7. Public Class Latihan043_46109054
    Dim Dwi As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/DATA GRAFIK.ACCDB")
    Dim dt As New DataTable

    Private Sub Latihan043_46109054_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 qpembelianperjenisbarang", Dwi)
    dt.Rows.Clear()
    a.Fill(dt)
    a.Dispose()

    dgv.DataSource = dt

    mustika.ColumnCount = 3
    mustika.RowCount = dt.Rows.Count

    Dim chaerunnisa As Integer = 0
    For Each x As DataRow In dt.Rows
    chaerunnisa += 1

    mustika.Row = chaerunnisa
    mustika.RowLabel = x("kode barang")

    mustika.Column = 1
    mustika.Data = x("unit")

    mustika.Column = 2
    mustika.Data = x("rata-rata harga") / 1000

    mustika.Column = 3
    mustika.Data = x("jumlah") / 10000
    Next
    End Sub
    End Class

    BalasHapus
  8. http://cacalisa.blogspot.com/2012/11/latihan4346110038_3.html

    BalasHapus
  9. http://rafidashaleh.blogspot.com/2012/11/latihan4346110041.html

    BalasHapus
  10. http://mulyawarman039.blogspot.com/2012/11/latihan4346110039.html

    BalasHapus
  11. http://bahrizj.blogspot.com/2012/11/latihan4346110001.html

    BalasHapus
  12. http://srikartikafanty.blogspot.com/2012/11/latihan4346110007.html

    BalasHapus
  13. http://idhamsyaam.blogspot.com/2012/11/latihan4346110021.html

    BalasHapus
  14. http://sulhihusni.blogspot.com/2012/11/latihan4346110004.html

    BalasHapus
  15. http://wahyunirachman.blogspot.com/2012/11/latihan4346110020.html

    BalasHapus
  16. Komentar ini telah dihapus oleh pengarang.

    BalasHapus
  17. http://alfaega.blogspot.com/2012/11/latihan4346110022.html

    BalasHapus
  18. http://fitrianihamka.blogspot.com/2012/11/latihan4346110006.html

    BalasHapus
  19. http://dianmegariski.blogspot.com/2012/11/latihan4346110023_24.html

    BalasHapus
  20. http://ildayani.blogspot.com/2012/11/latihan4346110002.html

    BalasHapus
  21. http://restyaccounting.blogspot.com/2012/12/latihan4346110027.html

    BalasHapus
  22. http://hanihasan07.blogspot.com/2012/12/latihan4346110044.html

    BalasHapus
  23. http://bothbon.blogspot.com/2013/01/latihan4346110043.html

    BalasHapus
  24. http://muthmil8.blogspot.com/2012/11/latihan4346110037.html

    BalasHapus
  25. http://amalmaulana92.blogspot.com/2013/01/latihan4346110003.html

    BalasHapus
  26. http://aardianzah2.blogspot.com/2013/01/latihan-43.html

    BalasHapus
  27. http://feibyfrycilia.blogspot.com/2013/01/latihan4346110055.html

    BalasHapus
  28. http://diyanahdina.blogspot.com/2013/01/latihan4346110045.html

    BalasHapus
  29. Komentar ini telah dihapus oleh pengarang.

    BalasHapus
  30. http://yuliaasrida427.blogspot.com/2013/01/latihan4346110009.html

    BalasHapus
  31. http://deodns.blogspot.com/#!/2013/01/latihan4346110040.html

    BalasHapus