Jumat, 04 November 2011

Latihan 29 Apkom 4 D4 B

Silahkan kumpul disini

10 komentar:

  1. FARADILLAH AMALIA RIVAI

    LATIHAN 29

    Public Class LATIHAN029_46109010


    Dim vr As New OleDb.OleDbCommand
    Dim farah As New ByIskandar.CariKeDataBaseByIskandar
    Dim rossi As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;jet oledb:database password=46")



    Private Sub s46109010Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles s46109010.Click
    If kb46109010.Text.Length = 0 Then
    MsgBox("isi yang kosong")
    Exit Sub
    End If

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

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

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

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

    Dim pencari As New ByIskandar.CariKeDataBaseByIskandar
    pencari.AturPencarianDataBase("Barang", "KodeBarang", t146109010.Text, 1, rossi)
    If pencari.JumlanBaris > 0 Then
    MsgBox("data yang anda masukkan telah ada")
    Exit Sub
    End If


    vr = New OleDb.OleDbCommand("update barang set kodebarang = '" & t146109010.Text & "', namabarang = '" & t246109010.Text & "', hargajual = " & Val(t346109010.Text) & ", jumlahbarang = " & Val(t446109010.Text) & " where kodebarang = '" & kb46109010.Text & "'", rossi)
    rossi.Open()
    vr.ExecuteNonQuery()
    rossi.Close()
    vr.Dispose()

    kb46109010.Text = ""
    t146109010.Text = ""
    t246109010.Text = ""
    t346109010.Text = ""
    t446109010.Text = ""
    End Sub
    End Class

    BalasHapus
  2. Public Class Latihan29_46109050

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

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    If KB_46109050.Text.Length = 0 Then
    MsgBox("Please Insert Your Text")
    Exit Sub
    End If

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

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

    If Val(QQ3_46109050.Text) = 0 Then
    MsgBox("Please Insert Your Text")
    Exit Sub
    End If

    If Val(QQ4_46109050.Text) = 0 Then
    MsgBox("Please Insert Your Text")
    Exit Sub
    End If

    Dim PENCARI As New ByIskandar.CariKeDataBaseByIskandar
    PENCARI.AturPencarianDataBase("BARANG", "KODEBARANG", QQ1_46109050.Text, 1, risky)

    If PENCARI.JumlanBaris > 0 Then
    MsgBox("The data has been exist please insert new data")
    QQ1_46109050.Text = ""
    QQ2_46109050.Text = ""
    QQ3_46109050.Text = ""
    QQ4_46109050.Text = ""
    Exit Sub
    End If
    Dim cm As New OleDb.OleDbCommand
    cm = New OleDb.OleDbCommand("Update BARANG set KODEBARANG ='" & QQ1_46109050.Text & "', NAMABARANG = '" & QQ2_46109050.Text & "', HARGAJUAL =" & Val(QQ3_46109050.Text) & ", JUMLAHBARANG = " & Val(QQ4_46109050.Text) & " where KODEBARANG = '" & KB_46109050.Text & "'", risky)
    risky.Open()
    cm.ExecuteNonQuery()
    risky.Close()
    cm.Dispose()

    QQ1_46109050.Text = ""
    QQ2_46109050.Text = ""
    QQ3_46109050.Text = ""
    QQ4_46109050.Text = ""
    End Sub
    End Class

    BalasHapus
  3. Andi Muh. Yusri
    46109038

    Public Class Latihan29_46109038
    Dim yusri As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\DATABARANG.accdb;jet OleDb:database password=300591")

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

    End Sub

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

    If Val(KobarBaru_46109038.Text) = 0 Then
    MsgBox("jumlah barang belum diisi")
    Exit Sub
    End If

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

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

    If Val(JumBar_46109038.Text) = 0 Then
    MsgBox("jumlah barang belum diisi")
    Exit Sub
    End If
    Dim Pencari As New ByIskandar.CariKeDataBaseByIskandar
    Pencari.AturPencarianDataBase("BARANG", "KODEBARANG", KobarBaru_46109038.Text, 1, yusri)

    If Pencari.JumlanBaris > 0 Then
    MsgBox("kode sudah ada")
    KoBar_46109038.Text = ""
    KobarBaru_46109038.Text = ""
    NamBar_46109038.Text = ""
    JumBar_46109038.Text = ""
    HarJu_46109038.Text = ""
    Exit Sub
    End If
    Dim com As New OleDb.OleDbCommand
    com = New OleDb.OleDbCommand("update Barang set KODEBARANG='" & KobarBaru_46109038.Text & "',NAMABARANG='" & NamBar_46109038.Text & "',hargajual=" & Val(HarJu_46109038.Text) & ", JUMLAHBARANG=" & Val(JumBar_46109038.Text) & " where KODEBARANG='" & KoBar_46109038.Text & "'", yusri)
    yusri.Open()
    com.ExecuteNonQuery()
    yusri.Close()
    com.Dispose()

    KoBar_46109038.Text = ""
    KobarBaru_46109038.Text = ""
    NamBar_46109038.Text = ""
    JumBar_46109038.Text = ""
    HarJu_46109038.Text = ""

    End Sub
    End Class

    BalasHapus
  4. Public Class Latihan029_46109015
    Dim go As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:database password=015")
    Private Sub Button1035_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1_46109015.Click
    If kb46109015.Text.Length = 0 Then
    MsgBox("Please Insert Your Text")
    Exit Sub
    End If

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

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

    If Val(t3_46109015.Text) = 0 Then
    MsgBox("Please Insert Your Text")
    Exit Sub
    End If

    If Val(t4_46109015.Text) = 0 Then
    MsgBox("Please Insert Your Text")
    Exit Sub
    End If

    Dim PENCARI As New ByIskandar.CariKeDataBaseByIskandar
    PENCARI.AturPencarianDataBase("BARANG", "KODEBARANG", t1_46109015.Text, 1, go)

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

    kb46109015.Text = ""
    t1_46109015.Text = ""
    t2_46109015.Text = ""
    t3_46109015.Text = ""
    t4_46109015.Text = ""
    Exit Sub
    End If

    Dim Cm As New OleDb.OleDbCommand
    Cm = New OleDb.OleDbCommand("Update BARANG set KODEBARANG ='" & t1_46109015.Text & "', NAMABARANG = '" & t2_46109015.Text & "', HARGAJUAL=" & Val(t3_46109015.Text) & ", JUMLAHBARANG=" & Val(t4_46109015.Text) & " where KODEBARANG='" & kb46109015.Text & "'", go)
    go.Open()
    Cm.ExecuteNonQuery()
    go.Close()
    Cm.Dispose()

    kb46109015.Text = ""
    t1_46109015.Text = ""
    t2_46109015.Text = ""
    t3_46109015.Text = ""
    t4_46109015.Text = ""
    End Sub
    End Class

    BalasHapus
  5. Public Class Latihan2946109047

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

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    If kb46109047.Text.Length = 0 Then
    MsgBox("Please Insert Your Text")
    Exit Sub
    End If

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

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

    If Val(t346109047.Text) = 0 Then
    MsgBox("Please Insert Your Text")
    Exit Sub
    End If

    If Val(t446109047.Text) = 0 Then
    MsgBox("Please Insert Your Text")
    Exit Sub
    End If

    Dim PENCARI As New ByIskandar.CariKeDataBaseByIskandar
    PENCARI.AturPencarianDataBase("BARANG", "KODEBARANG", t146109047.Text, 1, go)

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

    kb46109047.Text = ""
    t146109047.Text = ""
    t246109047.Text = ""
    t346109047.Text = ""
    t446109047.Text = ""
    Exit Sub
    End If

    Dim Cm As New OleDb.OleDbCommand
    Cm = New OleDb.OleDbCommand("Update BARANG set KODEBARANG ='" & t146109047.Text & "', NAMABARANG = '" & t246109047.Text & "', HARGAJUAL=" & Val(t346109047.Text) & ", JUMLAHBARANG=" & Val(t446109047.Text) & " where KODEBARANG='" & kb46109047.Text & "'", go)
    go.Open()
    Cm.ExecuteNonQuery()
    go.Close()
    Cm.Dispose()

    kb46109047.Text = ""
    t146109047.Text = ""
    t246109047.Text = ""
    t346109047.Text = ""
    t446109047.Text = ""
    End Sub

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

    End Sub
    End Class

    BalasHapus
  6. Komentar ini telah dihapus oleh pengarang.

    BalasHapus
  7. Public Class Form29
    Dim go As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;jet OLEDB:database password=allah swt")

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    If kb.Text.Length = 0 Then
    MsgBox("please insert your text")
    Exit Sub
    End If
    If vd1_052.Text.Length = 0 Then
    MsgBox("please insert your text")
    Exit Sub
    End If
    If vd2_052.Text.Length = 0 Then
    MsgBox("please insert your text")
    Exit Sub
    End If
    If Val(vd3_052.Text) = 0 Then
    MsgBox("please insert your text")
    Exit Sub
    End If
    If Val(vd4_052.Text) = 0 Then
    MsgBox("please insert your text")
    Exit Sub
    End If

    Dim PENCARI As New ByIskandar.CariKeDataBaseByIskandar
    PENCARI.AturPencarianDataBase("BARANG", "KODEBARANG", vd1_052.Text, 1, go)
    If PENCARI.JumlanBaris > 0 Then
    MsgBox("the data has been exist please insert new data")
    kb.Text = ""
    vd2_052.Text = ""
    vd3_052.Text = ""
    vd4_052.Text = ""
    Exit Sub
    End If

    Dim Cm As New OleDb.OleDbCommand
    Cm = New OleDb.OleDbCommand("update BARANG set KODEBARANG ='" & vd1_052.Text & "' , NAMABARANG = '" & vd2_052.Text & "' , HARGAJUAL=" & Val(vd3_052.Text) & ", JUMLAHBARANG =" & Val(vd4_052.Text) & " where KODEBARANG ='" & kb.Text & "'", go)
    go.Open()
    Cm.ExecuteNonQuery()
    go.Close()
    Cm.Dispose()
    kb.Text = ""
    vd1_052.Text = ""
    vd2_052.Text = ""
    vd3_052.Text = ""
    vd4_052.Text = ""
    End Sub
    End Class

    BalasHapus
  8. http://kumpulanlatihan46109060.blogspot.com/2011/11/latihan-29.html

    BalasHapus
  9. http://taufiqgooners.blogspot.com/2011/11/latihan-29-apkom.html

    BalasHapus
  10. http://irvanbravely.blogspot.com/2011/11/latihan-29-apkom.html

    BalasHapus