Jumat, 04 November 2011

Latihan 30 Apkom 4 D4 A

39 komentar:

  1. dewi sartika
    461 09 045
    3a.d4

    Public Class Latihan_030A_46109045

    Dim dewi As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; Data Source=" & Application.StartupPath & "\DATABARANG.accdb;jet oledb:database password=dewi sartika")
    Dim sartika As New DataTable

    Public Sub ambildata()
    Dim data As New OleDb.OleDbDataAdapter
    data = New OleDb.OleDbDataAdapter("SELECT* FROM BARANG", dewi)
    sartika.Rows.Clear()
    data.Fill(sartika)
    data.Dispose()
    End Sub

    Private Sub Latihan_030a_46109045_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    ambildata()
    DGV_46109045.DataSource = sartika
    End Sub

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

    LATIHAN_030B_46109045.ikha1_46109045.Text = DGV_46109045.CurrentRow.Cells("kodebarang").Value
    LATIHAN_030B_46109045.ikha2_46109045.Text = DGV_46109045.CurrentRow.Cells("kodebarang").Value
    LATIHAN_030B_46109045.ikha3_46109045.Text = DGV_46109045.CurrentRow.Cells("namabarang").Value
    LATIHAN_030B_46109045.ikha4_46109045.Text = DGV_46109045.CurrentRow.Cells("hargajual").Value
    LATIHAN_030B_46109045.ikha5_46109045.Text = DGV_46109045.CurrentRow.Cells("jumlahbarang").Value
    End Sub
    End Class

    BalasHapus
  2. Public Class LATIHAN_030B_46109045
    Dim dewi As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; Data Source=" & Application.StartupPath & "\DATABARANG.accdb;jet oledb:database password=dewi sartika")

    Private Sub chiko1_46109045_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chiko1_46109045.Click
    If ikha2_46109045.Text.Length = 0 Then
    MsgBox("Please Insert You Text")
    Exit Sub
    End If

    If ikha3_46109045.Text.Length = 0 Then
    MsgBox("Please Insert You Text")
    Exit Sub
    End If

    If ikha4_46109045.Text.Length = 0 Then
    MsgBox("Please Insert You Text")
    Exit Sub
    End If

    If ikha5_46109045.Text.Length = 0 Then
    MsgBox("Please Insert You Text")
    Exit Sub
    End If

    If ikha1_46109045.Text <> ikha2_46109045.Text Then
    Dim PENCARI As New ByIskandar.CariKeDataBaseByIskandar
    PENCARI.AturPencarianDataBase("BARANG", "KODEBARANG", ikha2_46109045.Text, 1, dewi)

    If PENCARI.JumlanBaris > 0 Then
    MsgBox("The data has been exist please insert new data")

    ikha2_46109045.Text = ""
    ikha3_46109045.Text = ""
    ikha4_46109045.Text = ""
    ikha5_46109045.Text = ""
    Exit Sub
    End If
    End If

    Dim sartika As New OleDb.OleDbCommand
    sartika = New OleDb.OleDbCommand("Update BARANG set KODEBARANG = '" & ikha2_46109045.Text & "', NAMABARANG = '" & ikha3_46109045.Text & "', HARGAJUAL=" & Val(ikha4_46109045.Text) & ", JUMLAHBARANG=" & Val(ikha5_46109045.Text) & " WHERE KODEBARANG='" & ikha1_46109045.Text & "'", dewi)
    dewi.Open()
    sartika.ExecuteNonQuery()
    dewi.Close()
    sartika.Dispose()

    ikha1_46109045.Text = ""
    ikha2_46109045.Text = ""
    ikha3_46109045.Text = ""
    ikha4_46109045.Text = ""
    ikha5_46109045.Text = ""

    LATIHAN_030A_46109045.ambildata()

    Me.Close()
    End Sub

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

    End Sub
    End Class

    BalasHapus
  3. Public Class Latihan30A_46109001

    Dim dwitya As New DataTable
    Dim wiwi As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.ACCDB")

    Public Sub dwityasaadahsuaib()
    Dim tingting As New OleDb.OleDbDataAdapter
    tingting = New OleDb.OleDbDataAdapter("select * from barang", wiwi)
    dwitya.Rows.Clear()
    tingting.Fill(dwitya)
    tingting.Dispose()
    End Sub

    Private Sub Latihan_30A_022_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    dwityasaadahsuaib()
    data46109001.DataSource = dwitya
    End Sub

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

    Latihan30B_46109001.KOD46109001.Text = data46109001.CurrentRow.Cells("kodebarang").Value
    Latihan30B_46109001.KB46109001.Text = data46109001.CurrentRow.Cells("kodebarang").Value
    Latihan30B_46109001.NB46109001.Text = data46109001.CurrentRow.Cells("namabarang").Value
    Latihan30B_46109001.HJ46109001.Text = data46109001.CurrentRow.Cells("hargajual").Value
    Latihan30B_46109001.JB46109001.Text = data46109001.CurrentRow.Cells("jumlahbarang").Value

    Latihan30B_46109001.Show()
    End Sub
    End Class

    BalasHapus
  4. Public Class Latihan30B_46109001


    Dim dwitya As New OleDb.OleDbCommand
    Dim saadah As New ByIskandar.CariKeDataBaseByIskandar
    Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\databarang.accdb")

    Private Sub S46109001_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles S46109001.Click
    If KB46109001.Text.Length = 0 Then
    MsgBox("Isi yang kosong")
    Exit Sub
    End If

    If NB46109001.Text.Length = 0 Then
    MsgBox("Isi yang kosong")
    Exit Sub
    End If

    If Val(HJ46109001.Text) = 0 Then
    MsgBox("Isi yang kosong")
    Exit Sub
    End If

    If Val(JB46109001.Text) = 0 Then
    MsgBox("Isi yang kosong")
    Exit Sub
    End If

    If Kod46109001.Text <> KB46109001.Text Then

    saadah.AturPencarianDataBase("Barang", "KodeBarang", KB46109001.Text, 1, conect)
    If saadah.JumlanBaris > 0 Then
    MsgBox("kode barang telah ada ")
    Exit Sub
    End If
    End If

    dwitya = New OleDb.OleDbCommand("update barang set kodebarang = '" & KB46109001.Text & "', namabarang = '" & NB46109001.Text & "', hargajual = " & Val(HJ46109001.Text) & ", jumlahbarang = " & Val(JB46109001.Text) & " where kodebarang = '" & Kod46109001.Text & "'", conect)
    conect.Open()
    dwitya.ExecuteNonQuery()
    conect.Close()
    dwitya.Dispose()

    Kod46109001.Text = ""
    KB46109001.Text = ""
    NB46109001.Text = ""
    HJ46109001.Text = ""
    JB46109001.Text = ""
    End Sub
    End Class

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

    Public Sub ambildata()
    Dim data As New OleDb.OleDbDataAdapter
    data = New OleDb.OleDbDataAdapter("SELECT* FROM BARANG", jembatan)
    ambil.Rows.Clear()
    data.Fill(ambil)
    data.Dispose()
    End Sub

    Private Sub Form30_A_46109008_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    ambildata()
    DGV_46109008.DataSource = ambil
    End Sub
    Private Sub Button1_click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1_46109008.Click
    If LATIHAN030B_46109008.Visible = False Then
    LATIHAN030B_46109008.Show()
    Else
    LATIHAN030B_46109008.Activate()
    End If
    LATIHAN030B_46109008.KB_46109008.Text = DGV_46109008.CurrentRow.Cells("KODEBARANG").Value
    LATIHAN030B_46109008.KB1_46109008.Text = DGV_46109008.CurrentRow.Cells("KODEBARANG").Value
    LATIHAN030B_46109008.NB_46109008.Text = DGV_46109008.CurrentRow.Cells("NAMABARANG").Value
    LATIHAN030B_46109008.HJ_46109008.Text = DGV_46109008.CurrentRow.Cells("HARGAJUAL").Value
    LATIHAN030B_46109008.JB_46109008.Text = DGV_46109008.CurrentRow.Cells("JUMLAHBARANG").Value
    End Sub
    End Class

    BalasHapus
  6. Public Class LATIHAN030B_46109008
    Dim Jalan 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 KB1_46109008.Text.Length = 0 Then
    MsgBox("please insert your text")
    Exit Sub
    End If
    If NB_46109008.Text.Length = 0 Then
    MsgBox("please insert your text")
    Exit Sub
    End If
    If Val(HJ_46109008.Text) = 0 Then
    MsgBox("please insert your text")
    Exit Sub
    End If
    If Val(JB_46109008.Text) = 0 Then
    MsgBox("please insert your text")
    Exit Sub
    End If
    If KB_46109008.Text <> KB1_46109008.Text Then
    Dim PENCARI As New ByIskandar.CariKeDataBaseByIskandar
    PENCARI.AturPencarianDataBase("BARANG", "KODEBARANG", KB1_46109008.Text, 1, Jalan)
    If PENCARI.JumlanBaris > 0 Then
    MsgBox("the data has been exist please insert new data")
    KB1_46109008.Text = ""
    NB_46109008.Text = ""
    HJ_46109008.Text = ""
    JB_46109008.Text = ""
    Exit Sub
    End If
    End If
    Dim Cmd As New OleDb.OleDbCommand
    Cmd = New OleDb.OleDbCommand("update BARANG set KODEBARANG ='" & KB1_46109008.Text & "', NAMABARANG = '" & NB_46109008.Text & "', HARGAJUAL=" & Val(HJ_46109008.Text) & ", JUMLAHBARANG=" & Val(JB_46109008.Text) & " where KODEBARANG='" & KB_46109008.Text & "'", Jalan)
    Jalan.Open()
    Cmd.Dispose()
    KB_46109008.Text = ""
    KB1_46109008.Text = ""
    NB_46109008.Text = ""
    HJ_46109008.Text = ""
    JB_46109008.Text = ""
    LATIHAN030A_46109008.ambildata()
    Me.Close()
    End Sub
    End Class

    BalasHapus
  7. Public Class Latihan_030A_054

    Dim INDAH As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; Data Source=" & Application.StartupPath & "\DATABARANG.accdb;jet oledb:database password=INDAH YANI")
    Dim YANI As New DataTable

    Public Sub ambildata()
    Dim data As New OleDb.OleDbDataAdapter
    data = New OleDb.OleDbDataAdapter("SELECT* FROM BARANG", INDAH)
    YANI.Rows.Clear()
    data.Fill(YANI)
    data.Dispose()
    End Sub

    Private Sub Latihan_030a_054_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    ambildata()
    DGV_46109053.DataSource = YANI
    End Sub

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

    LATIHAN_030B_46109053.SAE1_46109053.Text = DGV_46109053.CurrentRow.Cells("kodebarang").Value
    LATIHAN_030B_46109053.SAE2_46109053.Text = DGV_46109053.CurrentRow.Cells("kodebarang").Value
    LATIHAN_030B_46109053.SAE3_46109053.Text = DGV_46109053.CurrentRow.Cells("namabarang").Value
    LATIHAN_030B_46109053.SAE4_46109053.Text = DGV_46109053.CurrentRow.Cells("hargajual").Value
    LATIHAN_030B_46109053.SAE5_46109053.Text = DGV_46109053.CurrentRow.Cells("jumlahbarang").Value
    End Sub
    End Class

    BalasHapus
  8. Public Class LATIHAN_030B_46109053
    Dim INDAH As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; Data Source=" & Application.StartupPath & "\DATABARANG.accdb;jet oledb:database password=INDAH YANI")

    Private Sub Saenong1_46109053_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Saenong1_46109053.Click
    If sae2_46109053.Text.Length = 0 Then
    MsgBox("Please Insert You Text")
    Exit Sub
    End If

    If sae3_46109053.Text.Length = 0 Then
    MsgBox("Please Insert You Text")
    Exit Sub
    End If

    If sae4_46109053.Text.Length = 0 Then
    MsgBox("Please Insert You Text")
    Exit Sub
    End If

    If sae5_46109053.Text.Length = 0 Then
    MsgBox("Please Insert You Text")
    Exit Sub
    End If

    If sae1_46109053.Text <> sae2_46109053.Text Then
    Dim PENCARI As New ByIskandar.CariKeDataBaseByIskandar
    PENCARI.AturPencarianDataBase("BARANG", "KODEBARANG", sae2_46109053.Text, 1, INDAH)

    If PENCARI.JumlanBaris > 0 Then
    MsgBox("The data has been exist please insert new data")

    sae2_46109053.Text = ""
    sae3_46109053.Text = ""
    sae4_46109053.Text = ""
    sae5_46109053.Text = ""
    Exit Sub
    End If
    End If

    Dim YANI As New OleDb.OleDbCommand
    YANI = New OleDb.OleDbCommand("Update BARANG set KODEBARANG = '" & sae2_46109053.Text & "', NAMABARANG = '" & sae3_46109053.Text & "', HARGAJUAL=" & Val(sae4_46109053.Text) & ", JUMLAHBARANG=" & Val(sae5_46109053.Text) & " WHERE KODEBARANG='" & sae1_46109053.Text & "'", INDAH)
    INDAH.Open()
    YANI.ExecuteNonQuery()
    INDAH.Close()
    YANI.Dispose()

    sae1_46109053.Text = ""
    sae2_46109053.Text = ""
    sae3_46109053.Text = ""
    sae4_46109053.Text = ""
    sae5_46109053.Text = ""

    LATIHAN_030A_054.ambildata()

    Me.Close()
    End Sub

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

    End Sub
    End Class

    BalasHapus
  9. Public Class LATIHAN030A46109017
    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 LATIHAN030A46109017_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 LATIHAN030B46109017.Visible = False Then
    LATIHAN030B46109017.Show()
    Else
    LATIHAN030B46109017.Activate()
    End If
    End Sub

    End Class

    Public Class LATIHAN030B36109033

    Dim CONECT As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=putri")
    Dim cari As New ByIskandar.CariKeDataBaseByIskandar

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

    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

    cari.AturPencarianDataBase("BARANG", "KODEBARANG", kb46109017.Text, 1, CONECT)

    If cari.JumlanBaris = False Then
    MsgBox("kode tidak ada")
    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 ='" & kb46109017.Text & "'", CONECT)

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

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

    End Sub
    End Class

    BalasHapus
  10. Tugas Ahmad Syukri Ardiansya(46109040)

    http://tugas46109040.blogspot.com/2011/11/latihan-30apkom.html

    BalasHapus
  11. nama : febiana fransiskus
    stmbk : 46109027

    Public Class LATIHAN030A_46109027

    Dim FEBIANA As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; Data Source=" & Application.StartupPath & "\DATABARANG.accdb;jet oledb:database password=FEBIANA ANA")
    Dim ANA As New DataTable

    Public Sub ambildata()
    Dim data As New OleDb.OleDbDataAdapter
    data = New OleDb.OleDbDataAdapter("SELECT* FROM BARANG", FEBIANA)
    ANA.Rows.Clear()
    data.Fill(ANA)
    data.Dispose()
    End Sub

    Private Sub LATIHAN030A_46109027_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    ambildata()
    DGV_46109027.DataSource = ANA
    End Sub

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

    BalasHapus
  12. nama : febiana fransiskus
    stmbk : 46109027

    LATIHAN030B_46109027.FEBY1_46109027.Text = DGV_46109027.CurrentRow.Cells("kodebarang").Value
    LATIHAN030B_46109027.FEBY2_46109027.Text = DGV_46109027.CurrentRow.Cells("kodebarang").Value
    LATIHAN030B_46109027.FEBY3_46109027.Text = DGV_46109027.CurrentRow.Cells("namabarang").Value
    LATIHAN0030B_46109027.FEBY4_46109027.Text = DGV_46109027.CurrentRow.Cells("hargajual").Value
    LATIHAN030B_46109027.FEBY5_46109027.Text = DGV_46109027.CurrentRow.Cells("jumlahbarang").Value
    End Sub
    End Class


    Public Class LATIHAN030B_46109027
    Dim FEBIANA As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; Data Source=" & Application.StartupPath & "\DATABARANG.accdb;jet oledb:database password=FEBIANA ANA")

    Private Sub Fransiskus1_46109027_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Fransiskus1_46109027.Click
    If feby2_46109027.Text.Length = 0 Then
    MsgBox("Please Insert You Text")
    Exit Sub
    End If

    If feby3_46109027.Text.Length = 0 Then
    MsgBox("Please Insert You Text")
    Exit Sub
    End If

    If feby4_46109027.Text.Length = 0 Then
    MsgBox("Please Insert You Text")
    Exit Sub
    End If

    If feby5_46109027.Text.Length = 0 Then
    MsgBox("Please Insert You Text")
    Exit Sub
    End If

    If feby1_46109027.Text <> feby2_46109027.Text Then
    Dim PENCARI As New ByIskandar.CariKeDataBaseByIskandar
    PENCARI.AturPencarianDataBase("BARANG", "KODEBARANG", feby2_46109027.Text, 1, FEBIANA)

    If PENCARI.JumlanBaris > 0 Then
    MsgBox("The data has been exist please insert new data")

    feby2_46109027.Text = ""
    feby3_46109027.Text = ""
    feby4_46109027.Text = ""
    feby5_46109027.Text = ""
    Exit Sub
    End If
    End If

    Dim ANA As New OleDb.OleDbCommand
    ANA = New OleDb.OleDbCommand("Update BARANG set KODEBARANG = '" & feby2_46109027.Text & "', NAMABARANG = '" & feby3_46109027.Text & "', HARGAJUAL=" & Val(feby4_46109027.Text) & ", JUMLAHBARANG=" & Val(feby5_46109027.Text) & " WHERE KODEBARANG='" & feby1_46109027.Text & "'", FEBIANA)
    FEBIANA.Open()
    ANA.ExecuteNonQuery()
    FEBIANA.Close()
    ANA.Dispose()

    feby1_46109027.Text = ""
    feby2_46109027.Text = ""
    feby3_46109027.Text = ""
    feby4_46109027.Text = ""
    feby5_46109027.Text = ""

    LATIHAN030A_054.ambildata()

    Me.Close()
    End Sub

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

    End Sub
    End Class

    BalasHapus
  13. EAHDANIAH
    46109051


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

    Public Sub ambildata()
    Dim data As New OleDb.OleDbDataAdapter
    data = New OleDb.OleDbDataAdapter("SELECT* FROM BARANG", nia)
    ambil.Rows.Clear()
    data.Fill(ambil)
    data.Dispose()
    End Sub

    Private Sub LATIHAN30A_46109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    ambildata()
    dg46109051.DataSource = ambil
    End Sub
    Private Sub Button1_click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    If LATIHAN30B_46109051.Visible = False Then
    LATIHAN30B_46109051.Show()
    Else
    LATIHAN30B_46109051.Activate()
    End If
    LATIHAN30B_46109051.kb46109051.Text = dg46109051.CurrentRow.Cells("KODEBARANG").Value
    LATIHAN30B_46109051.TB146109051.Text = dg46109051.CurrentRow.Cells("KODEBARANG").Value
    LATIHAN30B_46109051.TB246109051.Text = dg46109051.CurrentRow.Cells("NAMABARANG").Value
    LATIHAN30B_46109051.TB346109051.Text = dg46109051.CurrentRow.Cells("HARGAJUAL").Value
    LATIHAN30B_46109051.TB446109051.Text = dg46109051.CurrentRow.Cells("JUMLAHBARANG").Value
    End Sub
    End Class












    LATIHAN30B_46109051
    Public Class LATIHAN30B_46109051

    Dim nia 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 TB146109051.Text.Length = 0 Then
    MsgBox("please insert your text")
    Exit Sub
    End If
    If TB246109051.Text.Length = 0 Then
    MsgBox("please insert your text")
    Exit Sub
    End If
    If Val(TB346109051.Text) = 0 Then
    MsgBox("please insert your text")
    Exit Sub
    End If
    If Val(TB446109051.Text) = 0 Then
    MsgBox("please insert your text")
    Exit Sub
    End If
    If kb46109051.Text <> TB146109051.Text Then
    Dim PENCARI As New ByIskandar.CariKeDataBaseByIskandar
    PENCARI.AturPencarianDataBase("BARANG","KODEBARANG", TB146109051.Text, 1, nia)
    If PENCARI.JumlanBaris > 0 Then
    MsgBox("the data has been exist please insert new data")
    TB146109051.Text = ""
    TB246109051.Text = ""
    TB346109051.Text = ""
    TB446109051.Text = ""
    Exit Sub
    End If
    End If

    Dim Cm As New OleDb.OleDbCommand
    Cm = New OleDb.OleDbCommand("update BARANG set KODEBARANG ='" & TB146109051.Text & "', NAMABARANG = '" & TB246109051.Text & "', HARGAJUAL=" & Val(TB346109051.Text) & ", JUMLAHBARANG=" & Val(TB446109051.Text) & " where KODEBARANG='" & kb46109051.Text & "'", nia)
    nia.Open()
    Cm.Dispose()
    kb46109051.Text = ""
    TB146109051.Text = ""
    TB246109051.Text = ""
    TB346109051.Text = ""
    TB446109051.Text = ""
    LATIHAN30A_46109051.ambildata()
    Me.Close()
    End Sub
    End Class

    BalasHapus
  14. tugasku 27-34


    http://arularva.blogspot.com/2011/11/tugas-27-34-muh-fahrul-46109005_20.html

    BalasHapus
  15. Komentar ini telah dihapus oleh pengarang.

    BalasHapus
  16. http://wahyunirachman.blogspot.com/2012/10/latihan30a46110020.html

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

    BalasHapus
  17. http://ildayani.blogspot.com/2012/10/latihan30a46110002.html

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

    BalasHapus
  18. Komentar ini telah dihapus oleh pengarang.

    BalasHapus
  19. http://diyanahdina.blogspot.com/2012/10/latihan30a46110045.html

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

    BalasHapus
  20. http://srikartikafanty.blogspot.com/2012/10/latihan30a46110007.html

    http://srikartikafanty.blogspot.com/2012/10/latihan30b46110007_6326.html

    BalasHapus
  21. http://alfaega.blogspot.com/2012/10/latihan30a46110022.html

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

    BalasHapus
  22. http://hanihasan07.blogspot.com/2012/10/latihan30a46110044.html
    http://hanihasan07.blogspot.com/2012/10/latihan30b46110044.html

    BalasHapus
  23. http://idhamsyaam.blogspot.com/2012/10/latihan3046110021.html

    BalasHapus
  24. http://sulhihusni.blogspot.com/2012/10/latihan30a46110004.html
    http://sulhihusni.blogspot.com/2012/10/latihan30b46110004.html

    BalasHapus
  25. http://restyaccounting.blogspot.com/2012/10/latihan30a46110027.html
    http://restyaccounting.blogspot.com/2012/10/latihan30b46110027.html

    BalasHapus
  26. http://amalmaulana92.blogspot.com/2012/10/latihan30a46110003.html

    http://amalmaulana92.blogspot.com/2012/10/latihan30b46110003.html

    BalasHapus
  27. http://mulyawarman039.blogspot.com/2012/10/latihan30a46110039.html
    http://mulyawarman039.blogspot.com/2012/10/latihan30b46110039.html

    BalasHapus
  28. http://dianmegariski.blogspot.com/2012/10/latihan3046110023.html

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

    BalasHapus
  29. http://feibyfrycilia.blogspot.com/2012/10/latihan30a46110055.html
    http://feibyfrycilia.blogspot.com/2012/10/latihan30b46110055.html

    BalasHapus
  30. http://fitrianihamka.blogspot.com/2012/10/latihan30a46110006.html
    http://fitrianihamka.blogspot.com/2012/10/latihan30b46110006.html

    BalasHapus
  31. http://bahrizj.blogspot.com/2012/10/latihan30a46110001.html
    http://bahrizj.blogspot.com/2012/10/latihan30b46110001.html

    BalasHapus
  32. http://bothbon.blogspot.com/2012/10/latihan30a46110043.html
    http://bothbon.blogspot.com/2012/10/latihan30b46110043.html

    BalasHapus
  33. http://muthmil8.blogspot.com/2012/10/latihan30adan30b46110037.html

    BalasHapus
  34. http://aardianzah2.blogspot.com/2012/10/latihan-30a.html
    http://aardianzah2.blogspot.com/2012/10/latihan-30b.html

    BalasHapus
  35. http://rafidashaleh.blogspot.com/2012/10/latihan30a46110041.html
    http://rafidashaleh.blogspot.com/2012/10/latihan30b46110041.html

    BalasHapus
  36. http://cacalisa.blogspot.com/2012/10/latihan30a46110038.html
    http://cacalisa.blogspot.com/2012/10/latihan30b46110038.html


    BalasHapus
  37. http://deodns.blogspot.com/2012/10/latihan30a46110040.html

    http://deodns.blogspot.com/2012/10/latihan30b46110040.html

    BalasHapus
  38. http://yuliaasrida427.blogspot.com/2012/10/latihan30a46110009.html

    http://yuliaasrida427.blogspot.com/2012/10/latihan30b46110009.html

    BalasHapus
  39. http://masdarwati.blogspot.com/2012/10/latihan30a46110024.html
    http://masdarwati.blogspot.com/2012/10/latihan30b46110024.html

    BalasHapus