Jumat, 04 November 2011

Latihan 32 Apkom 4 D4 A

45 komentar:

  1. dewi sartika
    461 09 045
    3a.d4

    Public NotInheritable Class form32a_46109045
    Dim dewi As New DataTable
    Dim sartika As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DATABARANG.accdb'")

    Private Sub tambah_46109045_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tambah_46109045.Click
    If form32b_46109045.Visible = False Then
    form32b_46109045.Show()
    Else
    form32b_46109045.Activate()
    End If
    End Sub

    Private Sub form32a_46109045_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 barang", sartika)
    dewi.Rows.Clear()
    adapter.Fill(sartika)
    adapter.Dispose()
    dgv_46109045.DataSource = sartika
    End Sub

    Private Sub edit_46109045_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles edit_46109045.Click
    If form32c_46109045.Visible = False Then
    form32c_46109045.Show()
    Else
    form32c_46109045.Activate()
    End If
    form32c_46109045.kbl_46109045.Text = dgv_46109045.CurrentRow.Cells("kodebarang").Value
    form32c_46109045.kb_46109045.Text = dgv_46109045.CurrentRow.Cells("kodebarang").Value
    form32c_46109045.nb_46109045.Text = dgv_46109045.CurrentRow.Cells("namabarang").Value
    form32c_46109045.jb_46109045.Text = dgv_46109045.CurrentRow.Cells("jumlahbarang").Value
    form32c_46109045.hj_46109045.Text = dgv_46109045.CurrentRow.Cells("hargajual").Value
    End Sub
    End Class

    BalasHapus
  2. Public NotInheritable Class form32b_46109045
    Dim chiko As New ByIskandar.CariKeDataBaseByIskandar
    Dim dewi As New OleDb.OleDbCommand
    Dim sartikai As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DATABARANG.accdb'")

    Private Sub simpan_46109045_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles simpan_46109045.Click
    chiko.AturPencarianDataBase("Barang", "KodeBarang", kb_46109045.Text, 1, sartika)
    If chiko.JumlanBaris > 0 Then
    MsgBox("kode barang telah ada")
    kb_46109045.Text = ""
    Exit Sub
    ElseIf kb_46109045.Text.Length = 0 Then
    MsgBox("kode barang harus tercantum")
    Exit Sub
    ElseIf nb_46109045.Text.Length = 0 Then
    MsgBox("nama barang harus tercantum")
    Exit Sub
    ElseIf hj_46109045.Text.Length = 0 Then
    MsgBox("harga jual harus tercantum")
    Exit Sub
    ElseIf jb_46109045.Text.Length = 0 Then
    MsgBox("jumlah barang harus tercantum")
    Exit Sub
    End If
    Dim ikha As String = "insert into barang (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & kb_46109045.Text & "','" & nb_46109045.Text & "'," & Val(hj_46109045.Text) & "," & Val(jb_46109045.Text) & ")"
    dewi = New OleDb.OleDbCommand(ikha,sartika)
    sartika.Open()
    dewi.ExecuteNonQuery()
    sartika.Close()
    dewi.Dispose()
    kb_46109045.Text = ""
    nb_46109045.Text = ""
    hj_46109045.Text = ""
    jb_46109045.Text = ""
    End Sub
    End Class

    BalasHapus
  3. Public NotInheritable Class form32c_46109045
    Dim chiko As New ByIskandar.CariKeDataBaseByIskandar
    Dim dewi As New OleDb.OleDbCommand
    Dim sartika As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DATABARANG.accdb'")

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    If kbl_46109045.Text <> kb_46109045.Text Then
    chiko.AturPencarianDataBase("Barang", "KodeBarang", kb_46109045.Text, 1, sartika)
    If chiko.JumlanBaris > 0 Then
    MsgBox("kode barang tidak dapat diupdate")
    Exit Sub
    End If
    End If
    If kb_46109045.Text.Length = 0 Then
    MsgBox("kode barang harus tercantum")
    Exit Sub
    ElseIf nb_46109045.Text.Length = 0 Then
    MsgBox("nama barang harus tercantum")
    Exit Sub
    ElseIf hj_46109045.Text.Length = 0 Then
    MsgBox("harga jual harus tercantum")
    Exit Sub
    ElseIf jb_46109045.Text.Length = 0 Then
    MsgBox("jumlah barang harus tercantum")
    Exit Sub
    End If
    Dim ikha As String = "update barang set kodebarang = '" & kb_46109045.Text & "', namabarang = '" & nb_46109045.Text & "', hargajual = " & Val(hj_46109045.Text) & ", jumlahbarang = " & Val(jb_46109045.Text) & " where kodebarang = '" & kbl_46109045.Text & "'"
    dewi = New OleDb.OleDbCommand(ikha, sartika)
    sartika.Open()
    dewi.ExecuteNonQuery()
    sartika.Close()
    dewi.Dispose()
    kbl_46109045.Text = "-"
    kb_46109045.Text = ""
    nb_46109045.Text = ""
    hj_46109045.Text = ""
    jb_46109045.Text = ""
    End Sub
    End Class

    BalasHapus
  4. Public Class LATIHAN032A_46109008

    Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;jet OLEDB:database password=46109008")
    Dim shoell As New DataTable

    Private Sub Latihan32_A_46109008_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 barang", conect)
    adapter.Fill(shoell)
    DGV_46109008.DataSource = shoell
    End Sub
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1_46109008.Click
    If LATIHAN032C_46109008.Visible = False Then
    LATIHAN032C_46109008.Show()
    Else
    LATIHAN032C_46109008.Activate()
    End If
    LATIHAN032C_46109008.ToolStripStatusLabel1.Text = "kode barang lama= " & DGV_46109008.CurrentRow.Cells("kodebarang").Value
    LATIHAN032C_46109008.KB_46109008.Text = DGV_46109008.CurrentRow.Cells("kodebarang").Value
    LATIHAN032C_46109008.NB_46109008.Text = DGV_46109008.CurrentRow.Cells("namabarang").Value
    LATIHAN032C_46109008.HJ_46109008.Text = DGV_46109008.CurrentRow.Cells("hargajual").Value
    LATIHAN032C_46109008.JB_46109008.Text = DGV_46109008.CurrentRow.Cells("jumlahbarang").Value
    End Sub
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2_46109008.Click
    If LATIHAN032B_46109008.Visible = False Then
    LATIHAN032B_46109008.Show()
    Else
    LATIHAN032B_46109008.Activate()
    End If
    End Sub
    End Class

    BalasHapus
  5. Public Class LATIHAN032B_46109008
    Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;jet OLEDB:database password=46109008")
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1_46109008.Click
    If Val(KB_46109008.Text) = 0 Then
    MsgBox("kode barang belum terisi")
    Exit Sub
    End If
    If NB_46109008.Text.Length = 0 Then
    MsgBox("nama barang belum terisi")
    Exit Sub
    End If
    If Val(HJ_46109008.Text) = 0 Then
    MsgBox("harga jual belum diisi")
    Exit Sub
    End If
    If Val(JB_46109008.Text) = 0 Then
    MsgBox("jumlah barang belum diisi")
    Exit Sub
    End If

    Dim shoell As New OleDb.OleDbCommand
    shoell = New OleDb.OleDbCommand("psTambahBarang", conect)
    shoell.CommandType = CommandType.StoredProcedure
    shoell.Parameters.Add(New OleDb.OleDbParameter("pKodeBarang", KB_46109008.Text))
    shoell.Parameters.Add(New OleDb.OleDbParameter("pNamaBarang", NB_46109008.Text))
    shoell.Parameters.Add(New OleDb.OleDbParameter("pPersawal", Val(HJ_46109008.Text)))
    shoell.Parameters.Add(New OleDb.OleDbParameter("pHargajual", Val(JB_46109008.Text)))
    conect.Open()
    shoell.ExecuteNonQuery()
    conect.Close()
    shoell.Dispose()

    KB_46109008.Text = ""
    NB_46109008.Text = ""
    HJ_46109008.Text = ""
    JB_46109008.Text = ""
    End Sub

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

    End Sub
    End Class

    BalasHapus
  6. Public Class LATIHAN032C_46109008
    Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;jet OLEDB:database password=46109008")

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1_46109008.Click
    If Val(KB_46109008.Text) = 0 Then
    MsgBox("maaf kode barang belum terisi")
    Exit Sub
    End If
    If NB_46109008.Text.Length = 0 Then
    MsgBox("maaf nama barang belum terisi")
    Exit Sub
    End If
    If Val(HJ_46109008.Text) = 0 Then
    MsgBox("maaf harga jual belum diisi")
    Exit Sub
    End If
    If Val(JB_46109008.Text) = 0 Then
    MsgBox("maaf jumlah barang belum diisi")
    Exit Sub
    End If

    Dim com As New OleDb.OleDbCommand
    com = New OleDb.OleDbCommand("UPDATE BARANG SET kodebarang = '" & KB_46109008.Text & "', namabarang = '" & NB_46109008.Text & "', hargajual = " & Val(HJ_46109008.Text) & ", jumlahbarang = " & Val(JB_46109008.Text) & " where kodebarang ='" & ToolStripStatusLabel1.Text & "'", conect)
    conect.Open()
    com.ExecuteNonQuery()
    conect.Close()
    com.Dispose()

    KB_46109008.Text = ""
    NB_46109008.Text = ""
    HJ_46109008.Text = ""
    JB_46109008.Text = ""

    End Sub

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

    End Sub
    End Class

    BalasHapus
  7. Komentar ini telah dihapus oleh pengarang.

    BalasHapus
  8. Public NotInheritable Class Form32C
    Dim DAUDE As New ByIskandar.CariKeDataBaseByIskandar
    Dim FADILLAH As New OleDb.OleDbCommand
    Dim SAGENA As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DATABARANG.accdb'")

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    If DILA1_46109059.Text <> DILA2_46109059.Text Then
    DAUDE.AturPencarianDataBase("Barang", "KodeBarang", DILA2_46109059.Text, 1, SAGENA)
    If DAUDE.Jumlahbaris > 0 Then
    MsgBox("kode barang tidak dapat diupdate")
    Exit Sub
    End If
    End If
    If DILA2_46109059.Text.Length = 0 Then
    MsgBox("kode barang harus tercantum")
    Exit Sub
    ElseIf DILA3_46109059.Text.Length = 0 Then
    MsgBox("nama barang harus tercantum")
    Exit Sub
    ElseIf DILA5_46109059.Text.Length = 0 Then
    MsgBox("harga jual harus tercantum")
    Exit Sub
    ElseIf DILA4_46109059.Text.Length = 0 Then
    MsgBox("jumlah barang harus tercantum")
    Exit Sub
    End If
    Dim DILA As String = "update barang set kodebarang = '" & DILA2_46109059.Text & "', namabarang = '" & DILA3_46109059.Text & "', hargajual = " & Val(DILA5_46109059.Text) & ", jumlahbarang = " & Val(DILA4_46109059.Text) & " where kodebarang = '" & DILA1_46109059.Text & "'"
    FADILLAH = New OleDb.OleDbCommand(DILA, SAGENA)
    SAGENA.Open()
    FADILLAH.ExecuteNonQuery()
    SAGENA.Close()
    FADILLAH.Dispose()
    DILA1_46109059.Text = "-"
    DILA2_46109059.Text = ""
    DILA3_46109059.Text = ""
    DILA5_46109059.Text = ""
    DILA4_46109059.Text = ""
    End Sub
    End Class

    BalasHapus
  9. Komentar ini telah dihapus oleh pengarang.

    BalasHapus
  10. Public NotInheritable Class form32b_46109023
    Dim cimi As New ByIskandar.CariKeDataBaseByIskandar
    Dim ismi As New OleDb.OleDbCommand
    Dim sri As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DATABARANG.accdb'")

    Private Sub simpan_46109023_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles simpan_46109023.Click
    cimi.AturPencarianDataBase("Barang", "KodeBarang", kb_46109023.Text, 1, sri)
    If cimi.JumlanBaris > 0 Then
    MsgBox("kode barang telah ada")
    kb_46109023.Text = ""
    Exit Sub
    ElseIf kb_46109023.Text.Length = 0 Then
    MsgBox("kode barang harus tercantum")
    Exit Sub
    ElseIf nb_46109023.Text.Length = 0 Then
    MsgBox("nama barang harus tercantum")
    Exit Sub
    ElseIf hj_46109023.Text.Length = 0 Then
    MsgBox("harga jual harus tercantum")
    Exit Sub
    ElseIf jb_46109023.Text.Length = 0 Then
    MsgBox("jumlah barang harus tercantum")
    Exit Sub
    End If
    Dim cimii As String = "insert into barang (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & kb_46109023.Text & "','" & nb_46109023.Text & "'," & Val(hj_46109023.Text) & "," & Val(jb_46109023.Text) & ")"
    ismi = New OleDb.OleDbCommand(ikha,sri)
    sri.Open()
    ismi.ExecuteNonQuery()
    sri.Close()
    ismi.Dispose()
    kb_46109023.Text = ""
    nb_46109023.Text = ""
    hj_46109023.Text = ""
    jb_46109023.Text = ""
    End Sub
    End Class

    BalasHapus
  11. Public NotInheritable Class form32c_46109023
    Dim cimi As New ByIskandar.CariKeDataBaseByIskandar
    Dim ismi As New OleDb.OleDbCommand
    Dim sri As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DATABARANG.accdb'")

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    If kbl_46109023.Text <> kb_46109023.Text Then
    cimi.AturPencarianDataBase("Barang", "KodeBarang", kb_46109023.Text, 1, sri)
    If cimi.JumlanBaris > 0 Then
    MsgBox("kode barang tidak dapat diupdate")
    Exit Sub
    End If
    End If
    If kb_46109023.Text.Length = 0 Then
    MsgBox("kode barang harus tercantum")
    Exit Sub
    ElseIf nb_46109023.Text.Length = 0 Then
    MsgBox("nama barang harus tercantum")
    Exit Sub
    ElseIf hj_46109023.Text.Length = 0 Then
    MsgBox("harga jual harus tercantum")
    Exit Sub
    ElseIf jb_46109023.Text.Length = 0 Then
    MsgBox("jumlah barang harus tercantum")
    Exit Sub
    End If
    Dim cimii As String = "update barang set kodebarang = '" & kb_46109023.Text & "', namabarang = '" & nb_46109023.Text & "', hargajual = " & Val(hj_46109023.Text) & ", jumlahbarang = " & Val(jb_46109023.Text) & " where kodebarang = '" & kbl_46109023.Text & "'"
    ismi = New OleDb.OleDbCommand(cimii, sri)
    sri.Open()
    ismi.ExecuteNonQuery()
    sri.Close()
    ismi.Dispose()
    kbl_46109023.Text = "-"
    kb_46109023.Text = ""
    nb_46109023.Text = ""
    hj_46109023.Text = ""
    jb_46109023.Text = ""
    End Sub
    End Class

    BalasHapus
  12. Public NotInheritable Class form32a_46109053
    Dim indah As New DataTable
    Dim yani As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DATABARANG.accdb'")

    Private Sub tambah_46109053_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tambah_46109053.Click
    If form32b_46109053.Visible = False Then
    form32b_46109053.Show()
    Else
    form32b_46109053.Activate()
    End If
    End Sub

    Private Sub form32a_46109053_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 barang", yani)
    indah.Rows.Clear()
    adapter.Fill(indah)
    adapter.Dispose()
    dgv_46109053.DataSource = indah
    End Sub

    Private Sub edit_46109053_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles edit_46109053.Click
    If form32c_46109053.Visible = False Then
    form32c_46109053.Show()
    Else
    form32c_46109053.Activate()
    End If
    form32c_46109053.kbl_46109053.Text = dgv_46109053.CurrentRow.Cells("kodebarang").Value
    form32c_46109053.kb_46109053.Text = dgv_46109053.CurrentRow.Cells("kodebarang").Value
    form32c_46109053.nb_46109053.Text = dgv_46109053.CurrentRow.Cells("namabarang").Value
    form32c_46109053.jb_46109053.Text = dgv_46109053.CurrentRow.Cells("jumlahbarang").Value
    form32c_46109053.hj_46109053.Text = dgv_46109053.CurrentRow.Cells("hargajual").Value
    End Sub
    End Class

    BalasHapus
  13. Public NotInheritable Class form32b_46109053
    Dim saenong As New ByIskandar.CariKeDataBaseByIskandar
    Dim indah As New OleDb.OleDbCommand
    Dim yani As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DATABARANG.accdb'")

    Private Sub simpan_46109053_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles simpan_46109053.Click
    saenong.AturPencarianDataBase("Barang", "KodeBarang", kb_46109053.Text, 1, yani)
    If saenong.JumlanBaris > 0 Then
    MsgBox("kode barang telah ada")
    kb_46109053.Text = ""
    Exit Sub
    ElseIf kb_46109053.Text.Length = 0 Then
    MsgBox("kode barang harus tercantum")
    Exit Sub
    ElseIf nb_46109053.Text.Length = 0 Then
    MsgBox("nama barang harus tercantum")
    Exit Sub
    ElseIf hj_46109053.Text.Length = 0 Then
    MsgBox("harga jual harus tercantum")
    Exit Sub
    ElseIf jb_46109053.Text.Length = 0 Then
    MsgBox("jumlah barang harus tercantum")
    Exit Sub
    End If
    Dim sae As String = "insert into barang (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & kb_46109053.Text & "','" & nb_46109053.Text & "'," & Val(hj_46109053.Text) & "," & Val(jb_46109053.Text) & ")"
    indah = New OleDb.OleDbCommand(sae, yani)
    yani.Open()
    indah.ExecuteNonQuery()
    yani.Close()
    indah.Dispose()
    kb_46109053.Text = ""
    nb_46109053.Text = ""
    hj_46109053.Text = ""
    jb_46109053.Text = ""
    End Sub
    End Class

    BalasHapus
  14. Public NotInheritable Class form32c_46109053
    Dim saenong As New ByIskandar.CariKeDataBaseByIskandar
    Dim indah As New OleDb.OleDbCommand
    Dim yani As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DATABARANG.accdb'")

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    If kbl_46109053.Text <> kb_46109053.Text Then
    saenong.AturPencarianDataBase("Barang", "KodeBarang", kb_46109053.Text, 1, yani)
    If saenong.JumlanBaris > 0 Then
    MsgBox("kode barang tidak dapat diupdate")
    Exit Sub
    End If
    End If
    If kb_46109053.Text.Length = 0 Then
    MsgBox("kode barang harus tercantum")
    Exit Sub
    ElseIf nb_46109053.Text.Length = 0 Then
    MsgBox("nama barang harus tercantum")
    Exit Sub
    ElseIf hj_46109053.Text.Length = 0 Then
    MsgBox("harga jual harus tercantum")
    Exit Sub
    ElseIf jb_46109053.Text.Length = 0 Then
    MsgBox("jumlah barang harus tercantum")
    Exit Sub
    End If
    Dim sae As String = "update barang set kodebarang = '" & kb_46109053.Text & "', namabarang = '" & nb_46109053.Text & "', hargajual = " & Val(hj_46109053.Text) & ", jumlahbarang = " & Val(jb_46109053.Text) & " where kodebarang = '" & kbl_46109053.Text & "'"
    indah = New OleDb.OleDbCommand(sae, yani)
    yani.Open()
    indah.ExecuteNonQuery()
    yani.Close()
    indah.Dispose()
    kbl_46109053.Text = "-"
    kb_46109053.Text = ""
    nb_46109053.Text = ""
    hj_46109053.Text = ""
    jb_46109053.Text = ""
    End Sub
    End Class

    BalasHapus
  15. Public Class LATIHAN032A46109017
    Dim CONECT As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=putri")
    Dim ayu As New DataTable
    Private Sub latihan1546109017_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim cobajaa As New OleDb.OleDbDataAdapter
    cobajaa = New OleDb.OleDbDataAdapter("select * from barang", CONECT)
    cobajaa.Fill(ayu)
    DataGridView1.DataSource = ayu
    End Sub
    Private Sub Button146109017_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button146109017.Click
    If LATIHAN032C46109017.Visible = False Then
    LATIHAN032C46109017.Show()
    Else
    LATIHAN032C46109017.Activate()
    End If
    LATIHAN032C46109017.ToolStripStatusLabel1.Text = "kode barang lama= " & DataGridView1.CurrentRow.Cells("KodeBarang").Value
    LATIHAN032C46109017.t136109033.Text = DataGridView1.CurrentRow.Cells("KodeBarang").Value
    LATIHAN032C46109017.t246109017.Text = DataGridView1.CurrentRow.Cells("NamaBarang").Value
    LATIHAN032C46109017.t346109017.Text = DataGridView1.CurrentRow.Cells("Hargajual").Value
    LATIHAN032C46109017.t446109017.Text = DataGridView1.CurrentRow.Cells("jumlahbarang").Value
    End Sub

    Private Sub Button246109017_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button246109017.Click
    If LATIHAN032B46109017.Visible = False Then
    LATIHAN032B46109017.Show()
    Else
    LATIHAN032B46109017.Activate()
    End If

    End Sub

    End Class

    Public Class LATIHAN032B46109017

    Dim CONECT As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=putri")
    Private Sub Button146109017_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button146109017.Click

    If Val(t146109017.Text) = 0 Then
    MsgBox("kode barang belum terisi")
    Exit Sub
    End If

    If t246109017.Text.Length = 0 Then
    MsgBox("nama barang belum terisi")
    Exit Sub
    End If

    If Val(t346109017.Text) = 0 Then
    MsgBox("harga jual belum diisi")
    Exit Sub
    End If

    If Val(t446109017.Text) = 0 Then
    MsgBox("jumlah barang belum diisi")
    Exit Sub
    End If
    Dim ayu As New OleDb.OleDbCommand
    ayu = New OleDb.OleDbCommand("PsTambahBarang", Conect)
    ayu.CommandType = CommandType.StoredProcedure
    ayu.Parameters.Add(New OleDb.OleDbParameter("pKodeBarang", t146109017.Text))
    ayu.Parameters.Add(New OleDb.OleDbParameter("pNamaBarang", t246109017.Text))
    ayu.Parameters.Add(New OleDb.OleDbParameter("pPersawal", Val(t346109017.Text)))
    ayu.Parameters.Add(New OleDb.OleDbParameter("pHargajual", Val(t446109017.Text)))
    Conect.Open()
    ayu.ExecuteNonQuery()
    Conect.Close()
    ayu.Dispose()

    t146109017.Text = ""
    t246109017.Text = ""
    t346109017.Text = ""
    t446109017.Text = ""

    End Sub

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

    End Sub
    End Class

    BalasHapus
  16. Public Class LATIHAN032C46109017
    Dim CONECT As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=putri")
    Private Sub Button146109017_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button146109017.Click
    If Val(t146109017.Text) = 0 Then
    MsgBox("kode barang belum terisi")
    Exit Sub
    End If

    If t246109017.Text.Length = 0 Then
    MsgBox("nama barang belum terisi")
    Exit Sub
    End If

    If Val(t346109017.Text) = 0 Then
    MsgBox("harga jual belum diisi")
    Exit Sub
    End If

    If Val(t446109017.Text) = 0 Then
    MsgBox("jumlah barang belum diisi")
    Exit Sub
    End If
    Dim com As New OleDb.OleDbCommand
    com = New OleDb.OleDbCommand("UPDATE BARANG SET kodebarang = '" & t146109017.Text & "', namabarang = '" & t246109017.Text & "', hargajual = " & Val(t346109017.Text) & ", jumlahbarang = " & Val(t446109017.Text) & " where kodebarang ='" & ToolStripStatusLabel1.Text & "'", CONECT)

    CONECT.Open()
    com.ExecuteNonQuery()
    CONECT.Close()
    com.Dispose()

    t146109017.Text = ""
    t246109017.Text = ""
    t346109017.Text = ""
    t446109017.Text = ""

    End Sub
    End Class

    BalasHapus
  17. Tugas Ahmad Syukri Ardiansya(46109040)

    http://tugas46109040.blogspot.com/2011/11/latihan32apkom.html

    BalasHapus
  18. nama : febiana fransiskus
    stmbk : 46109027

    Public NotInheritable Class LATIHAN32a_46109027
    Dim FEBIANA As New DataTable
    Dim ana As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DATABARANG.accdb'")

    Private Sub tambah_46109027_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tambah_46109027.Click
    If LATIHAN32b_46109027.Visible = False Then
    LATIHAN32b_46109027.Show()
    Else
    LATIHAN32b_46109027.Activate()
    End If
    End Sub

    Private Sub LATIHAN32a_46109027_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 barang", ana)
    FEBIANA.Rows.Clear()
    adapter.Fill(FEBIANA)
    adapter.Dispose()
    dgv_46109027.DataSource = FEBIANA
    End Sub

    Private Sub edit_46109027_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles edit_46109027.Click
    If LATIHAN32c_46109027.Visible = False Then
    LATIHAN32c_46109027.Show()
    Else
    LATIHAN32c_46109027.Activate()
    End If
    LATIHAN32c_46109027.KBL_46109027.Text = dgv_46109027.CurrentRow.Cells("kodebarang").Value
    LATIHAN32c_46109027.KB_46109027.Text = dgv_46109027.CurrentRow.Cells("kodebarang").Value
    LATIHAN32c_46109027.NB_46109027.Text = dgv_46109027.CurrentRow.Cells("namabarang").Value
    LATIHAN32c_46109027.JB_46109027.Text = dgv_46109027.CurrentRow.Cells("jumlahbarang").Value
    LATIHAN32c_46109027.HJ_46109027.Text = dgv_46109027.CurrentRow.Cells("hargajual").Value
    End Sub
    End Class


    Public NotInheritable Class LATIHAN32b_46109027
    Dim fransiskus As New ByIskandar.CariKeDataBaseByIskandar
    Dim FEBIANA As New OleDb.OleDbCommand
    Dim ana As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DATABARANG.accdb'")

    Private Sub simpan_46109027_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles simpan_46109027.Click
    fransiskus.AturPencarianDataBase("Barang", "KodeBarang", KB_46109027.Text, 1, ana)
    If fransiskus.JumlaNBaris > 0 Then
    MsgBox("kode barang telah ada")
    KB_46109027.Text = ""
    Exit Sub
    ElseIf KB_46109027.Text.Length = 0 Then
    MsgBox("kode barang harus tercantum")
    Exit Sub
    ElseIf NB_46109027.Text.Length = 0 Then
    MsgBox("nama barang harus tercantum")
    Exit Sub
    ElseIf HJ_46109027.Text.Length = 0 Then
    MsgBox("harga jual harus tercantum")
    Exit Sub
    ElseIf JB_46109027.Text.Length = 0 Then
    MsgBox("jumlah barang harus tercantum")
    Exit Sub
    End If
    Dim FEBY As String = "insert into barang (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & KB_46109027.Text & "','" & NB_46109027.Text & "'," & Val(HJ_46109027.Text) & "," & Val(JB_46109027.Text) & ")"
    FEBIANA = New OleDb.OleDbCommand(FEBY, ana)
    ana.Open()
    FEBIANA.ExecuteNonQuery()
    ana.Close()
    FEBIANA.Dispose()
    KB_46109027.Text = ""
    NB_46109027.Text = ""
    HJ_46109027.Text = ""
    JB_46109027.Text = ""
    End Sub
    End Class

    BalasHapus
  19. nama : febiana fransiskus
    stmbk : 46109027

    Public NotInheritable Class LATIHAN32c_46109027
    Dim fransiskus As New ByIskandar.CariKeDataBaseByIskandar
    Dim FEBIANA As New OleDb.OleDbCommand
    Dim ana As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & Application.StartupPath & "\DATABARANG.accdb'")

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    If KBL_46109027.Text <> KB_46109027.Text Then
    fransiskus.AturPencarianDataBase("Barang", "KodeBarang", KB_46109027.Text, 1, ana)
    If fransiskus.JumlaNBaris > 0 Then
    MsgBox("kode barang tidak dapat diupdate")
    Exit Sub
    End If
    End If
    If KB_46109027.Text.Length = 0 Then
    MsgBox("kode barang harus tercantum")
    Exit Sub
    ElseIf NB_46109027.Text.Length = 0 Then
    MsgBox("nama barang harus tercantum")
    Exit Sub
    ElseIf HJ_46109027.Text.Length = 0 Then
    MsgBox("harga jual harus tercantum")
    Exit Sub
    ElseIf JB_46109027.Text.Length = 0 Then
    MsgBox("jumlah barang harus tercantum")
    Exit Sub
    End If
    Dim FEBY As String = "update barang set kodebarang = '" & KB_46109027.Text & "', namabarang = '" & NB_46109027.Text & "', hargajual = " & Val(HJ_46109027.Text) & ", jumlahbarang = " & Val(JB_46109027.Text) & " where kodebarang = '" & KBL_46109027.Text & "'"
    FEBIANA = New OleDb.OleDbCommand(FEBY, ana)
    ana.Open()
    FEBIANA.ExecuteNonQuery()
    ana.Close()
    FEBIANA.Dispose()
    KBL_46109027.Text = "-"
    KB_46109027.Text = ""
    NB_46109027.Text = ""
    HJ_46109027.Text = ""
    JB_46109027.Text = ""
    End Sub
    End Class

    BalasHapus
  20. WAHDANIAH
    46109051

    LATIHAN32A_46109051
    Public Class LATIHAN32A_46109051
    Dim CONECT As New OleDb.OleDbConnection ("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\databarang.accdb;jet OLEDB:database password=WAHDANIAH")
    Dim nia As New DataTable

    Private Sub LATIHAN32A_46109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim GO As New OleDb.OleDbDataAdapter
    GO = New OleDb.OleDbDataAdapter("select * from barang", CONECT)
    GO.Fill(nia)
    Dg_46109051.DataSource = nia
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    If LATIHAN32C_46109051.Visible = False Then
    LATIHAN32C_46109051.Show()
    Else
    LATIHAN32C_46109051.Activate()
    End If
    LATIHAN32C_46109051.ToolStripStatusLabel1.Text = "kode barang lama= " & Dg_46109051.CurrentRow.Cells("KodeBarang").Value
    LATIHAN32C_46109051.t1_46109051.Text = Dg_46109051.CurrentRow.Cells("KodeBarang").Value
    LATIHAN32C_46109051.t2_46109051.Text = Dg_46109051.CurrentRow.Cells("NamaBarang").Value
    LATIHAN32C_46109051.t3_46109051.Text = Dg_46109051.CurrentRow.Cells("Hargajual").Value
    LATIHAN32C_46109051.t4_46109051.Text = Dg_46109051.CurrentRow.Cells("jumlahbarang").Value
    End Sub
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    If LATIHAN32B_46109051.Visible = False Then
    LATIHAN32B_46109051.Show()
    Else
    LATIHAN32B_46109051.Activate()
    End If
    End Sub
    End Class














    LATIHAN32B_46109051
    Public Class LATIHAN32B_46109051
    Dim CONECT As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;jet OLEDB:database password=WAHDANIAH")

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    If Val(t146109051.Text) = 0 Then
    MsgBox("kode barang belum terisi")
    Exit Sub
    End If

    If t246109051.Text.Length = 0 Then
    MsgBox("nama barang belum terisi")
    Exit Sub
    End If

    If Val(t346109051.Text) = 0 Then
    MsgBox("harga jual belum diisi")
    Exit Sub
    End If

    If Val(t446109051.Text) = 0 Then
    MsgBox("jumlah barang belum diisi")
    Exit Sub
    End If
    Dim nia As New OleDb.OleDbCommand
    nia = New OleDb.OleDbCommand("PsTambahBarang", CONECT)
    nia.CommandType = CommandType.StoredProcedure
    nia.Parameters.Add(New OleDb.OleDbParameter("pKodeBarang", t146109051.Text))
    nia.Parameters.Add(New OleDb.OleDbParameter("pNamaBarang", t246109051.Text))
    nia.Parameters.Add(New OleDb.OleDbParameter("pPersawal", Val(t346109051.Text)))
    nia.Parameters.Add(New OleDb.OleDbParameter("pHargajual", Val(t446109051.Text)))
    CONECT.Open()
    nia.ExecuteNonQuery()
    CONECT.Close()
    nia.Dispose()

    t146109051.Text = ""
    t246109051.Text = ""
    t346109051.Text = ""
    t446109051.Text = ""
    End Sub
    End Class

    BalasHapus
  21. LATIHAN32C_46109051

    Public Class LATIHAN32C_46109051

    Dim CONECT As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;jet OLEDB:database password=WAHDANIAH")

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    If Val(t1_46109051.Text) = 0 Then
    MsgBox("kode barang belum terisi")
    Exit Sub
    End If

    If t2_46109051.Text.Length = 0 Then
    MsgBox("nama barang belum terisi")
    Exit Sub
    End If

    If Val(t3_46109051.Text) = 0 Then
    MsgBox("harga jual belum diisi")
    Exit Sub
    End If

    If Val(t4_46109051.Text) = 0 Then
    MsgBox("jumlah barang belum diisi")
    Exit Sub
    End If
    Dim ANI As New OleDb.OleDbCommand
    ANI = New OleDb.OleDbCommand("UPDATE BARANG SET kodebarang = '" & t1_46109051.Text & "', namabarang = '" & t2_46109051.Text & "', hargajual = " & Val(t3_46109051.Text) & ", jumlahbarang = " & Val(t4_46109051.Text) & " where kodebarang ='" & ToolStripStatusLabel1.Text & "'", CONECT)

    CONECT.Open()
    ANI.ExecuteNonQuery()
    CONECT.Close()
    ANI.Dispose()

    t1_46109051.Text = ""
    t2_46109051.Text = ""
    t3_46109051.Text = ""
    t4_46109051.Text = ""
    End Sub

    End Class

    BalasHapus
  22. http://wahyunirachman.blogspot.com/2012/10/latihan32a46110020.html

    http://wahyunirachman.blogspot.com/2012/10/latihan32b46110020.html

    http://wahyunirachman.blogspot.com/2012/10/latihan32c46110020.html

    BalasHapus
  23. http://ildayani.blogspot.com/2012/10/latihan32a46110002.html

    http://ildayani.blogspot.com/2012/10/latihan32b46110002.html

    http://ildayani.blogspot.com/2012/10/latihan32c46110002.html

    BalasHapus
  24. http://srikartikafanty.blogspot.com/2012/10/latihan32a46110007.html
    http://srikartikafanty.blogspot.com/2012/10/latihan32b46110007.html
    http://srikartikafanty.blogspot.com/2012/10/latihan32c46110007.html

    BalasHapus
  25. http://alfaega.blogspot.com/2012/10/latihan32a46110022.html

    http://alfaega.blogspot.com/2012/10/latihan32b46110022.html

    http://alfaega.blogspot.com/2012/10/latihan32c46110022.html

    BalasHapus
  26. http://hanihasan07.blogspot.com/2012/10/latihan32a46110044.html
    http://hanihasan07.blogspot.com/2012/10/latihan32b46110044.html
    http://hanihasan07.blogspot.com/2012/10/latihan32c46110044.html

    BalasHapus
  27. http://idhamsyaam.blogspot.com/2012/10/latihan3246110021.html

    BalasHapus
  28. http://sulhihusni.blogspot.com/2012/10/latihan32a46110004.html
    http://sulhihusni.blogspot.com/2012/10/latihan32b46110004.html
    http://sulhihusni.blogspot.com/2012/10/latihan32c46110004.html

    BalasHapus
  29. http://restyaccounting.blogspot.com/2012/10/latihan32a46110027.html
    http://restyaccounting.blogspot.com/2012/10/latihan32b46110027.html
    http://restyaccounting.blogspot.com/2012/10/latihan32c46110027.html

    BalasHapus
  30. Komentar ini telah dihapus oleh pengarang.

    BalasHapus
  31. http://amalmaulana92.blogspot.com/2012/10/latihan32a46110003.html
    http://amalmaulana92.blogspot.com/2012/10/latihan32b46110003.html
    http://amalmaulana92.blogspot.com/2012/10/latihan32b46110003_11.html

    BalasHapus
  32. http://diyanahdina.blogspot.com/2012/10/latihan32a46110045.html

    http://diyanahdina.blogspot.com/2012/10/latihan32b46110045.html

    http://diyanahdina.blogspot.com/2012/10/latihan32c46110045.html

    BalasHapus
  33. http://mulyawarman039.blogspot.com/2012/10/latihan32a46110039.html
    http://mulyawarman039.blogspot.com/2012/10/latihan32b46110039.html
    http://mulyawarman039.blogspot.com/2012/10/latihan32c46110039.html

    BalasHapus
  34. http://dianmegariski.blogspot.com/2012/10/latihan32a46110023_13.html

    http://dianmegariski.blogspot.com/2012/10/latihan32b46110023_13.html

    http://dianmegariski.blogspot.com/2012/10/latihan32c46110023.html

    BalasHapus
  35. http://feibyfrycilia.blogspot.com/2012/10/latihan32a46110055.html
    http://feibyfrycilia.blogspot.com/2012/10/latihan32b46110055.html
    http://feibyfrycilia.blogspot.com/2012/10/latihan32c46110055.html

    BalasHapus
  36. http://fitrianihamka.blogspot.com/2012/10/latihan32a46110006.html
    http://fitrianihamka.blogspot.com/2012/10/latihan32b46110006.html
    http://fitrianihamka.blogspot.com/2012/10/latihan32c46110006.html

    BalasHapus
  37. http://muthmil8.blogspot.com/2012/10/latihan32a32bdan32c46110037.html

    BalasHapus
  38. http://bothbon.blogspot.com/2012/10/latihan32a46110043.html
    http://bothbon.blogspot.com/2012/10/latihan32b46110043.html
    http://bothbon.blogspot.com/2012/10/latihan32c46110043.html

    BalasHapus
  39. http://bahrizj.blogspot.com/2012/10/latihan3246110001.html

    BalasHapus
  40. http://aardianzah2.blogspot.com/2012/10/latihan-32a.html
    http://aardianzah2.blogspot.com/2012/10/latihan-32b.html
    http://aardianzah2.blogspot.com/2012/10/latihan-32c.html

    BalasHapus
  41. http://rafidashaleh.blogspot.com/2012/10/latihan32a46110041.html
    http://rafidashaleh.blogspot.com/2012/10/latihan32b46110041.html
    http://rafidashaleh.blogspot.com/2012/10/latihan32c46110041.html

    BalasHapus
  42. http://cacalisa.blogspot.com/2012/10/latihan32a46110038.html
    http://cacalisa.blogspot.com/2012/10/latihan32b46110038.html
    http://cacalisa.blogspot.com/2012/10/latihan32c46110038.html

    BalasHapus
  43. http://yuliaasrida427.blogspot.com/2012/10/latihan32a46110009.html
    http://yuliaasrida427.blogspot.com/2012/10/latihan32b46110009.html
    http://yuliaasrida427.blogspot.com/2012/10/latihan32c46110009.html

    BalasHapus
  44. http://masdarwati.blogspot.com/2012/10/latihan32a46110024.html
    http://masdarwati.blogspot.com/2012/10/latihan32b46110024.html
    http://masdarwati.blogspot.com/2012/10/latihan32c46110024.html

    BalasHapus
  45. http://deodns.blogspot.com/#!/2013/01/latihan32a46110040.html
    http://deodns.blogspot.com/#!/2013/01/latihan32b46110040.html
    http://deodns.blogspot.com/#!/2013/01/latihan32c46110040.html

    BalasHapus