Private Sub DAFTARBARANGToolStripMenuItem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles DAFTARBARANGToolStripMenuItem.Click If LATIHAN034B_46109010.Visible = False Then LATIHAN034B_46109010.MdiParent = Me.MdiParent LATIHAN034B_46109010.Show()
Else LATIHAN034B_46109010.Activate() End If End Sub
Private Sub INPUTBARANGToolStripMenuItem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles INPUTBARANGToolStripMenuItem.Click If LATIHAN034C_46109010.Visible = False Then LATIHAN034C_46109010.MdiParent = Me.MdiParent LATIHAN034C_46109010.Show()
Else LATIHAN034C_46109010.Activate() End If End Sub
Private Sub ToolStripButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click If LATIHAN034B_46109010.Visible = False Then LATIHAN034B_46109010.MdiParent = Me.MdiParent LATIHAN034B_46109010.Show()
Else LATIHAN034B_46109010.Activate() End If End Sub
Private Sub ToolStripButton2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click If LATIHAN034C_46109010.Visible = False Then LATIHAN034C_46109010.MdiParent = Me.MdiParent LATIHAN034C_46109010.Show()
Else LATIHAN034C_46109010.Activate() End If End Sub End Class
Public Class LATIHAN034B_46109010 Dim rossi As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;jet oledb:database password=46") Dim farah As New DataTable
Public Sub valentinorossi() Dim angkut As New OleDb.OleDbDataAdapter angkut = New OleDb.OleDbDataAdapter("select * from barang", rossi) farah.Rows.Clear() angkut.Fill(farah) angkut.Dispose()
End Sub
Private Sub LATIHAN034B_46109010_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load valentinorossi() dtg46109010.DataSource = farah End Sub
Private Sub Button246109010_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button246109010.Click If LATIHAN034C_46109010.Visible = False Then LATIHAN034C_46109010.Show() Else LATIHAN034C_46109010.Activate() End If End Sub
Private Sub Button146109010_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button146109010.Click If LATIHAN034C_46109010.Visible = False Then LATIHAN034C_46109010.Show() Else LATIHAN034C_46109010.Activate() End If LATIHAN034C_46109010.KB.Text = dtg46109010.CurrentRow.Cells("KODEBARANG").Value LATIHAN034C_46109010.t146109010.Text = dtg46109010.CurrentRow.Cells("KODEBARANG").Value LATIHAN034C_46109010.t246109010.Text = dtg46109010.CurrentRow.Cells("NAMABARANG").Value LATIHAN034C_46109010.t346109010.Text = dtg46109010.CurrentRow.Cells("HARGAJUAL").Value LATIHAN034C_46109010.t446109010.Text = dtg46109010.CurrentRow.Cells("JUMLAHBARANG").Value() End Sub End Class
Private Sub TSL1_46109050_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TSL1_46109050.Click If Latihan34B_46109050.Visible = False Then Latihan34B_46109050.MdiParent = Me.MdiParent Latihan34B_46109050.Show()
Else Latihan34B_46109050.Activate() End If End Sub
Private Sub TSL2_46109050_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TSL2_46109050.Click If Latihan34C_46109050.Visible = False Then Latihan34C_46109050.MdiParent = Me.MdiParent Latihan34C_46109050.Show()
Else Latihan34C_46109050.Activate() End If End Sub
Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click If Latihan34B_46109050.Visible = False Then Latihan34B_46109050.MdiParent = Me.MdiParent Latihan34B_46109050.Show()
Else Latihan34B_46109050.Activate() End If End Sub
Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click If Latihan34C_46109050.Visible = False Then Latihan34C_46109050.MdiParent = Me.MdiParent Latihan34C_46109050.Show()
Else Latihan34C_46109050.Activate() End If End Sub End Class
Dim risky As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; Data Source=" & Application.StartupPath & "\DATABARANG.accdb;jet oledb:database password=kiki") Dim CARI As New ByIskandar.CariKeDataBaseByIskandar
Private Sub TAMBAH() If QQ1_46109050.Text.Length = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If
If QQ2_46109050.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If
If Val(QQ3_46109050.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(QQ4_46109050.Text) = 0 Then MsgBox("JUMLAH BELUM TERISI") Exit Sub End If
Private Sub EDIT() If QQ1_46109050.Text.Length = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If
If QQ2_46109050.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If
If Val(QQ3_46109050.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(QQ4_46109050.Text) = 0 Then MsgBox("JUMLAH BELUM TERISI") Exit Sub End If
If KB_46109050.Text <> QQ1_46109050.Text Then CARI.AturPencarianDataBase("barang", "kode barang", QQ1_46109050.Text, 1, risky)
If CARI.JumlanBaris > 0 Then MsgBox("kode sudah ada") Exit Sub End If End If
Dim com As New OleDb.OleDbCommand com = 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)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If KB_46109050.Text = "-" Then TAMBAH() Else EDIT() End If End Sub End Class
Private Sub DAFTARBARANGToolStripMenuItem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles DAFTARBARANGToolStripMenuItem.Click If LATIHAN034B_46109006.Visible = False Then LATIHAN034B_46109006.MdiParent = Me.MdiParent LATIHAN034B_46109006.Show() Else LATIHAN034B_46109006.Activate() End If End Sub
Private Sub INPUTBARANGToolStripMenuItem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles INPUTBARANGToolStripMenuItem.Click If LATIHAN034C_46109006.Visible = False Then LATIHAN034C_46109006.MdiParent = Me.MdiParent LATIHAN034C_46109006.Show()
Else LATIHAN034C_46109006.Activate() End If End Sub
Private Sub ToolStripButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click If LATIHAN034B_46109006.Visible = False Then LATIHAN034B_46109006.MdiParent = Me.MdiParent LATIHAN034B_46109006.Show()
Else LATIHAN034B_46109006.Activate() End If End Sub
Private Sub ToolStripButton2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click If LATIHAN034C_46109006.Visible = False Then LATIHAN034C_46109006.MdiParent = Me.MdiParent LATIHAN034C_46109006.Show()
Else LATIHAN034C_46109006.Activate() End If End Sub End Class
Public Class LATIHAN034C_46109006 Dim SRY As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;jet oledb:database password=10") Dim Pencarian As New ByIskandar.PencarianKeDataBaseByIskandar
Private Sub TAMBAH() If t146109006.Text.Length = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If
If t246109006.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If
If Val(t346109006.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(t446109006.Text) = 0 Then MsgBox("JUMLAH BELUM TERISI") Exit Sub End If
Private Sub DaftarBarangToolStripLabel_46109038_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles DaftarBarangToolStripLabel_46109038.Click If Latihan34B_46109038.Visible = False Then Latihan34B_46109038.MdiParent = Me.MdiParent Latihan34B_46109038.Show()
Else Latihan34B_46109038.Activate() End If End Sub
Private Sub InputBarang_46109038_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles InputBarang_46109038.Click If Latihan34C_46109038.Visible = False Then Latihan34C_46109038.MdiParent = Me.MdiParent Latihan34C_46109038.Show()
Else Latihan34C_46109038.Activate() End If End Sub
Private Sub ToolStripButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click If Latihan34B_46109038.Visible = False Then Latihan34B_46109038.MdiParent = Me.MdiParent Latihan34B_46109038.Show()
Else Latihan34B_46109038.Activate() End If End Sub
Private Sub ToolStripButton2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click If Latihan34C_46109038.Visible = False Then Latihan34C_46109038.MdiParent = Me.MdiParent Latihan34C_46109038.Show()
Else Latihan34C_46109038.Activate() End If End Sub End Class
Private Sub TSL146109047_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TSL146109047.Click If Latihan34B46109047.Visible = False Then Latihan34B46109047.MdiParent = Me.MdiParent Latihan34B46109047.Show()
Else Latihan34B46109047.Activate() End If End Sub
Private Sub TSL246109047_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TSL246109047.Click If Latihan34C46109047.Visible = False Then Latihan34C46109047.MdiParent = Me.MdiParent Latihan34C46109047.Show()
Else Latihan34C46109047.Activate() End If End Sub
Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click If Latihan34B46109047.Visible = False Then Latihan34B46109047.MdiParent = Me.MdiParent Latihan34B46109047.Show()
Else Latihan34B46109047.Activate() End If End Sub
Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click If Latihan34C46109047.Visible = False Then Latihan34C46109047.MdiParent = Me.MdiParent Latihan34C46109047.Show()
Dim itha As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:database password=979264") Dim CARI As New ByIskandar.CariKeDataBaseByIskandar
Private Sub TAMBAH() If TB146109047.Text.Length = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If
If TB246109047.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If
If Val(TB346109047.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(TB446109047.Text) = 0 Then MsgBox("JUMLAH BELUM TERISI") Exit Sub End If
Private Sub EDIT() If TB146109047.Text.Length = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If
If TB246109047.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If
If Val(TB346109047.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(TB446109047.Text) = 0 Then MsgBox("JUMLAH BELUM TERISI") Exit Sub End If
If KB46109047.Text <> TB146109047.Text Then CARI.AturPencarianDataBase("barang", "kode barang", TB146109047.Text, 1, itha)
If CARI.JumlanBaris > 0 Then MsgBox("kode sudah ada") Exit Sub End If End If
Dim com As New OleDb.OleDbCommand com = New OleDb.OleDbCommand("update barang set kodebarang ='" & TB146109047.Text & "',namabarang='" & TB246109047.Text & "',hargajual=" & Val(TB346109047.Text) & ", jumlahbarang=" & Val(TB446109047.Text) & "where kodebarang='" & KB46109047.Text & "'", itha)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If KB46109047.Text = "-" Then TAMBAH() Else EDIT() End If End Sub End Class
Private Sub DB46109020_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DB46109020.Click If LATIHAN034B_46109020.Visible = False Then LATIHAN034B_46109020.MdiParent = Me.MdiParent LATIHAN034B_46109020.Show()
Else LATIHAN034B_46109020.Activate() End If
End Sub
Private Sub ib46109020_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ib46109020.Click If LATIHAN034C_46109020.Visible = False Then LATIHAN034C_46109020.MdiParent = Me.MdiParent LATIHAN034C_46109020.Show()
Else LATIHAN034C_46109020.Activate() End If
End Sub
Private Sub DAFTARBARANGToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DAFTARBARANGToolStripMenuItem.Click If LATIHAN034B_46109020.Visible = False Then LATIHAN034B_46109020.MdiParent = Me.MdiParent LATIHAN034B_46109020.Show()
Else LATIHAN034B_46109020.Activate() End If End Sub
Private Sub INPUTBARANGToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles INPUTBARANGToolStripMenuItem.Click If LATIHAN034C_46109020.Visible = False Then LATIHAN034C_46109020.MdiParent = Me.MdiParent LATIHAN034C_46109020.Show()
Else LATIHAN034C_46109020.Activate() End If End Sub End Class
Private Sub DAFTARBARANGToolStripMenuItem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles DAFTARBARANGToolStripMenuItem.Click If Latihan034B_46109015.Visible = False Then Latihan034B_46109015.MdiParent = Me.MdiParent Latihan034B_46109015.Show() Else Latihan034B_46109015.Activate() End If End Sub
Private Sub INPUTBARANGToolStripMenuItem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles INPUTBARANGToolStripMenuItem.Click If Latihan034C_46109015.Visible = False Then Latihan034C_46109015.MdiParent = Me.MdiParent Latihan034C_46109015.Show()
Else Latihan034C_46109015.Activate() End If End Sub
Private Sub ToolStripButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click If Latihan034B_46109015.Visible = False Then Latihan034B_46109015.MdiParent = Me.MdiParent Latihan034B_46109015.Show()
Else Latihan034B_46109015.Activate() End If End Sub
Private Sub ToolStripButton2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click If Latihan034C_46109015.Visible = False Then Latihan034C_46109015.MdiParent = Me.MdiParent Latihan034C_46109015.Show() Else Latihan034C_46109015.Activate() End If End Sub End Class
Public Class Latihan034C_46109015 Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\DATABARANG.accdb;Jet OLEDB:Database Password=015") Dim cari As New ByIskandar.CariKeDataBaseByIskandar
Private Sub TAMBAH() If t1_46109015.Text.Length = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If
If t2_46109015.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If
If Val(t3_46109015.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(t4_46109015.Text) = 0 Then MsgBox("JUMLAH BELUM TERISI") Exit Sub End If
If cari.JumlanBaris > 0 Then MsgBox("kode sudah ada") Exit Sub End If
Dim com As New OleDb.OleDbCommand com = New OleDb.OleDbCommand("insert into barang(kodebarang,namabarang,hargajual,jumlahbarang) Values('" & t1_46109015.Text & "','" & t3_46109015.Text & "'," & Val(t3_46109015.Text) & "," & Val(t4_46109015.Text) & ")", conect)
Private Sub EDIT() If t1_46109015.Text.Length = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If
If t2_46109015.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If
If Val(t3_46109015.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(t4_46109015.Text) = 0 Then MsgBox("JUMLAH BELUM TERISI") Exit Sub End If
If KB_46109015.Text <> t1_46109015.Text Then cari.AturPencarianDataBase("barang", "kode barang", t1_46109015.Text, 1, conect)
If cari.JumlanBaris > 0 Then MsgBox("kode sudah ada") Exit Sub End If End If
Dim com As New OleDb.OleDbCommand com = 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='" & KB_46109015.Text & "'", conect)
Private Sub Button136109038_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1_46109015.Click If KB_46109015.Text = "-" Then TAMBAH() Else EDIT() End If End Sub End Class
Public Class Latihan34_A_46109044 Private Sub DAFTARBARANGToolStripMenuItem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles DAFTARBARANGToolStripMenuItem.Click If Latihan34_B_46109044.Visible = False Then Latihan34_B_46109044.MdiParent = Me.MdiParent Latihan34_B_46109044.Show() Else Latihan34_B_46109044.Activate() End If End Sub
Private Sub INPUTBARANGToolStripMenuItem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles INPUTBARANGToolStripMenuItem.Click If Latihan34_C_46109044.Visible = False Then Latihan34_C_46109044.MdiParent = Me.MdiParent Latihan34_C_46109044.Show()
Else Latihan34_C_46109044.Activate() End If End Sub
Private Sub ToolStripButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click If Latihan34_B_46109044.Visible = False Then Latihan34_B_46109044.MdiParent = Me.MdiParent Latihan34_B_46109044.Show()
Else Latihan34_B_46109044.Activate() End If End Sub
Private Sub ToolStripButton2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click If Latihan34_C_46109044.Visible = False Then Latihan34_C_46109044.MdiParent = Me.MdiParent Latihan34_C_46109044.Show()
Else Latihan34_C_46109044.Activate() End If End Sub
Private Sub DAFTARBARANGToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DAFTARBARANGToolStripMenuItem.Click If LATIHAN34B46109026.Visible = False Then LATIHAN34B46109026.MdiParent = Me.MdiParent LATIHAN34B46109026.Show()
Else LATIHAN34B46109026.Activate() End If
End Sub
Private Sub INPUTBARANGToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles INPUTBARANGToolStripMenuItem.Click If LATIHAN34C46109026.Visible = False Then LATIHAN34C46109026.MdiParent = Me.MdiParent LATIHAN34C46109026.Show()
Else LATIHAN34C46109026.Activate() End If
End Sub
Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click If LATIHAN34B46109026.Visible = False Then LATIHAN34B46109026.MdiParent = Me.MdiParent LATIHAN34B46109026.Show()
Else LATIHAN34B46109026.Activate() End If
End Sub
Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click
If LATIHAN34C46109026.Visible = False Then LATIHAN34C46109026.MdiParent = Me.MdiParent LATIHAN34C46109026.Show()
Public Class LATIHAN34C46109026 Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\DATABARANG.accdb;Jet OLEDB:Database Password=26") Dim cari As New ByIskandar.CariKeDataBaseByIskandar
Private Sub TAMBAH() If kb46109026.Text.Length = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If
If nb46109026.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If
If Val(hj46109026.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(jb46109026.Text) = 0 Then MsgBox("JUMLAH BELUM TERISI") Exit Sub End If
If cari.JumlanBaris > 0 Then MsgBox("kode sudah ada") Exit Sub End If
Dim com As New OleDb.OleDbCommand com = New OleDb.OleDbCommand("insert into barang(kodebarang,namabarang,hargajual,jumlahbarang) Values('" & kb46109026.Text & "','" & nb46109026.Text & "'," & Val(hj46109026.Text) & "," & Val(jb46109026.Text) & ")", conect)
Private Sub EDIT() If kb46109026.Text.Length = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If
If nb46109026.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If
If Val(hj46109026.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(jb46109026.Text) = 0 Then MsgBox("JUMLAH BELUM TERISI") Exit Sub End If
If KB.Text <> kb46109026.Text Then cari.AturPencarianDataBase("barang", "kode barang", kb46109026.Text, 1, conect)
If cari.JumlanBaris > 0 Then MsgBox("kode sudah ada") Exit Sub End If End If
Dim com As New OleDb.OleDbCommand com = New OleDb.OleDbCommand("update barang set kodebarang ='" & kb46109026.Text & "',namabarang='" & nb46109026.Text & "',hargajual=" & Val(hj46109026.Text) & ", jumlahbarang=" & Val(jb46109026.Text) & "where kodebarang='" & KB.Text & "'", conect)
Private Sub LATIHAN34C46109026_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If KB.Text = "-" Then TAMBAH() Else EDIT() End If End Sub
Private Sub TSL1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles TSL1.Click If Form34B.Visible = False Then Form34B.MdiParent = Me.MdiParent Form34B.Show()
Else Form34B.Activate() End If End Sub
Private Sub TSL2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles TSL2.Click If Form34C.Visible = False Then Form34C.MdiParent = Me.MdiParent Form34C.Show()
Else Form34C.Activate() End If End Sub
Private Sub ToolStripButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click If Form34B.Visible = False Then Form34B.MdiParent = Me.MdiParent Form34B.Show()
Else Form34B.Activate() End If End Sub
Private Sub ToolStripButton2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click If Form34C.Visible = False Then Form34C.MdiParent = Me.MdiParent Form34C.Show()
Public Class Form34C Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\DATABARANG.accdb;Jet OLEDB:Database Password=allah swt") Dim cari As New ByIskandar.CariKeDataBaseByIskandar
Private Sub TAMBAH() If vd1_052.Text.Length = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If
If vd2_052.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If
If Val(vd3_052.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(vd4_052.Text) = 0 Then MsgBox("JUMLAH BELUM TERISI") Exit Sub End If
If cari.JumlanBaris > 0 Then MsgBox("kode sudah ada") Exit Sub End If
Dim com As New OleDb.OleDbCommand com = New OleDb.OleDbCommand("insert into barang(kodebarang,namabarang,hargajual,jumlahbarang) Values('" & vd1_052.Text & "','" & vd2_052.Text & "'," & Val(vd3_052.Text) & "," & Val(vd4_052.Text) & ")", conect)
Private Sub EDIT() If vd1_052.Text.Length = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If
If vd2_052.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If
If Val(vd3_052.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(vd4_052.Text) = 0 Then MsgBox("JUMLAH BELUM TERISI") Exit Sub End If
If KB.Text <> vd1_052.Text Then cari.AturPencarianDataBase("barang", "kode barang", vd1_052.Text, 1, conect)
If cari.JumlanBaris > 0 Then MsgBox("kode sudah ada") Exit Sub End If End If
Dim com As New OleDb.OleDbCommand com = 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 & "'", conect)
Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click If KB.Text = "-" Then TAMBAH() Else EDIT() End If End Sub End Class
Public Class Form34_A_46109043 Private Sub DAFTARBARANGToolStripMenuItem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles DAFTARBARANGToolStripMenuItem.Click If Form34_B_46109043.Visible = False Then Form34_B_46109043.MdiParent = Me.MdiParent Form34_B_46109043.Show() Else Form34_B_46109043.Activate() End If End Sub
Private Sub INPUTBARANGToolStripMenuItem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles INPUTBARANGToolStripMenuItem.Click If Form34_C_46109043.Visible = False Then Form34_C_46109043.MdiParent = Me.MdiParent Form34_C_46109043.Show()
Else Form34_C_46109043.Activate() End If End Sub
Private Sub ToolStripButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click If Form34_B_46109043.Visible = False Then Form34_B_46109043.MdiParent = Me.MdiParent Form34_B_46109043.Show()
Else Form34_B_46109043.Activate() End If End Sub
Private Sub ToolStripButton2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click If Form34_C_46109043.Visible = False Then Form34_C_46109043.MdiParent = Me.MdiParent Form34_C_46109043.Show()
Else Form34_C_46109043.Activate() End If End Sub End Class
Public Class Form34_A_46109043 Private Sub DAFTARBARANGToolStripMenuItem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles DAFTARBARANGToolStripMenuItem.Click If Form34_B_46109043.Visible = False Then Form34_B_46109043.MdiParent = Me.MdiParent Form34_B_46109043.Show() Else Form34_B_46109043.Activate() End If End Sub
Private Sub INPUTBARANGToolStripMenuItem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles INPUTBARANGToolStripMenuItem.Click If Form34_C_46109043.Visible = False Then Form34_C_46109043.MdiParent = Me.MdiParent Form34_C_46109043.Show()
Else Form34_C_46109043.Activate() End If End Sub
Private Sub ToolStripButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click If Form34_B_46109043.Visible = False Then Form34_B_46109043.MdiParent = Me.MdiParent Form34_B_46109043.Show()
Else Form34_B_46109043.Activate() End If End Sub
Private Sub ToolStripButton2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click If Form34_C_46109043.Visible = False Then Form34_C_46109043.MdiParent = Me.MdiParent Form34_C_46109043.Show()
Else Form34_C_46109043.Activate() End If End Sub End Class
Public Class latihan_34A_46109044 Private Sub daftar46109044_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles daftar46109044.Click If latihan_34B_46109044.Visible = False Then latihan_34B_46109044.MdiParent = Me.MdiParent latihan_34B_46109044.Show()
Else latihan_34B_46109044.Activate() End If End Sub
Private Sub input46109044_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles input46109044.Click If latihan_34C_46109044.Visible = False Then latihan_34C_46109044.MdiParent = Me.MdiParent latihan_34C_46109044.Show()
Else latihan_34C_46109044.Activate() End If
End Sub
Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click If latihan_34B_46109044.Visible = False Then latihan_34B_46109044.MdiParent = Me.MdiParent latihan_34B_46109044.Show()
FARADILLAH AMALIA RIVAI
BalasHapusLATIHAN 34 A
Public Class LATIHAN034A_46109010
Private Sub DAFTARBARANGToolStripMenuItem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles DAFTARBARANGToolStripMenuItem.Click
If LATIHAN034B_46109010.Visible = False Then
LATIHAN034B_46109010.MdiParent = Me.MdiParent
LATIHAN034B_46109010.Show()
Else
LATIHAN034B_46109010.Activate()
End If
End Sub
Private Sub INPUTBARANGToolStripMenuItem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles INPUTBARANGToolStripMenuItem.Click
If LATIHAN034C_46109010.Visible = False Then
LATIHAN034C_46109010.MdiParent = Me.MdiParent
LATIHAN034C_46109010.Show()
Else
LATIHAN034C_46109010.Activate()
End If
End Sub
Private Sub ToolStripButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click
If LATIHAN034B_46109010.Visible = False Then
LATIHAN034B_46109010.MdiParent = Me.MdiParent
LATIHAN034B_46109010.Show()
Else
LATIHAN034B_46109010.Activate()
End If
End Sub
Private Sub ToolStripButton2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click
If LATIHAN034C_46109010.Visible = False Then
LATIHAN034C_46109010.MdiParent = Me.MdiParent
LATIHAN034C_46109010.Show()
Else
LATIHAN034C_46109010.Activate()
End If
End Sub
End Class
faradillah amalia rivai
BalasHapuslatihan 34 b
Public Class LATIHAN034B_46109010
Dim rossi As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;jet oledb:database password=46")
Dim farah As New DataTable
Public Sub valentinorossi()
Dim angkut As New OleDb.OleDbDataAdapter
angkut = New OleDb.OleDbDataAdapter("select * from barang", rossi)
farah.Rows.Clear()
angkut.Fill(farah)
angkut.Dispose()
End Sub
Private Sub LATIHAN034B_46109010_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
valentinorossi()
dtg46109010.DataSource = farah
End Sub
Private Sub Button246109010_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button246109010.Click
If LATIHAN034C_46109010.Visible = False Then
LATIHAN034C_46109010.Show()
Else
LATIHAN034C_46109010.Activate()
End If
End Sub
Private Sub Button146109010_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button146109010.Click
If LATIHAN034C_46109010.Visible = False Then
LATIHAN034C_46109010.Show()
Else
LATIHAN034C_46109010.Activate()
End If
LATIHAN034C_46109010.KB.Text = dtg46109010.CurrentRow.Cells("KODEBARANG").Value
LATIHAN034C_46109010.t146109010.Text = dtg46109010.CurrentRow.Cells("KODEBARANG").Value
LATIHAN034C_46109010.t246109010.Text = dtg46109010.CurrentRow.Cells("NAMABARANG").Value
LATIHAN034C_46109010.t346109010.Text = dtg46109010.CurrentRow.Cells("HARGAJUAL").Value
LATIHAN034C_46109010.t446109010.Text = dtg46109010.CurrentRow.Cells("JUMLAHBARANG").Value()
End Sub
End Class
Public Class Latihan34A_46109050
BalasHapusPrivate Sub TSL1_46109050_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TSL1_46109050.Click
If Latihan34B_46109050.Visible = False Then
Latihan34B_46109050.MdiParent = Me.MdiParent
Latihan34B_46109050.Show()
Else
Latihan34B_46109050.Activate()
End If
End Sub
Private Sub TSL2_46109050_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TSL2_46109050.Click
If Latihan34C_46109050.Visible = False Then
Latihan34C_46109050.MdiParent = Me.MdiParent
Latihan34C_46109050.Show()
Else
Latihan34C_46109050.Activate()
End If
End Sub
Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click
If Latihan34B_46109050.Visible = False Then
Latihan34B_46109050.MdiParent = Me.MdiParent
Latihan34B_46109050.Show()
Else
Latihan34B_46109050.Activate()
End If
End Sub
Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click
If Latihan34C_46109050.Visible = False Then
Latihan34C_46109050.MdiParent = Me.MdiParent
Latihan34C_46109050.Show()
Else
Latihan34C_46109050.Activate()
End If
End Sub
End Class
Public Class Latihan34C_46109050
BalasHapusDim risky As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; Data Source=" & Application.StartupPath & "\DATABARANG.accdb;jet oledb:database password=kiki")
Dim CARI As New ByIskandar.CariKeDataBaseByIskandar
Private Sub TAMBAH()
If QQ1_46109050.Text.Length = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If QQ2_46109050.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(QQ3_46109050.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(QQ4_46109050.Text) = 0 Then
MsgBox("JUMLAH BELUM TERISI")
Exit Sub
End If
CARI.AturPencarianDataBase("barang", "kode barang", QQ1_46109050.Text, 1, risky)
If CARI.JumlanBaris > 0 Then
MsgBox("kode sudah ada")
Exit Sub
End If
Dim mahira As New OleDb.OleDbCommand
mahira = New OleDb.OleDbCommand("insert into barang(kodebarang,namabarang,hargajual,jumlahbarang) Values('" & QQ1_46109050.Text & "','" & QQ2_46109050.Text & "'," & Val(QQ3_46109050.Text) & "," & Val(QQ4_46109050.Text) & ")", risky)
risky.Open()
mahira.ExecuteNonQuery()
risky.Close()
mahira.Dispose()
QQ1_46109050.Text = ""
QQ2_46109050.Text = ""
QQ3_46109050.Text = ""
QQ4_46109050.Text = ""
Latihan33A_46109050.zaza()
End Sub
Private Sub EDIT()
If QQ1_46109050.Text.Length = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If QQ2_46109050.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(QQ3_46109050.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(QQ4_46109050.Text) = 0 Then
MsgBox("JUMLAH BELUM TERISI")
Exit Sub
End If
If KB_46109050.Text <> QQ1_46109050.Text Then
CARI.AturPencarianDataBase("barang", "kode barang", QQ1_46109050.Text, 1, risky)
If CARI.JumlanBaris > 0 Then
MsgBox("kode sudah ada")
Exit Sub
End If
End If
Dim com As New OleDb.OleDbCommand
com = 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()
com.ExecuteNonQuery()
risky.Close()
com.Dispose()
QQ1_46109050.Text = ""
QQ2_46109050.Text = ""
QQ3_46109050.Text = ""
QQ4_46109050.Text = ""
KB_46109050.Text = "-"
Latihan33A_46109050.zaza()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If KB_46109050.Text = "-" Then
TAMBAH()
Else
EDIT()
End If
End Sub
End Class
Public Class LATIHAN034A_46109006
BalasHapusPrivate Sub DAFTARBARANGToolStripMenuItem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles DAFTARBARANGToolStripMenuItem.Click
If LATIHAN034B_46109006.Visible = False Then
LATIHAN034B_46109006.MdiParent = Me.MdiParent
LATIHAN034B_46109006.Show()
Else
LATIHAN034B_46109006.Activate()
End If
End Sub
Private Sub INPUTBARANGToolStripMenuItem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles INPUTBARANGToolStripMenuItem.Click
If LATIHAN034C_46109006.Visible = False Then
LATIHAN034C_46109006.MdiParent = Me.MdiParent
LATIHAN034C_46109006.Show()
Else
LATIHAN034C_46109006.Activate()
End If
End Sub
Private Sub ToolStripButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click
If LATIHAN034B_46109006.Visible = False Then
LATIHAN034B_46109006.MdiParent = Me.MdiParent
LATIHAN034B_46109006.Show()
Else
LATIHAN034B_46109006.Activate()
End If
End Sub
Private Sub ToolStripButton2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click
If LATIHAN034C_46109006.Visible = False Then
LATIHAN034C_46109006.MdiParent = Me.MdiParent
LATIHAN034C_46109006.Show()
Else
LATIHAN034C_46109006.Activate()
End If
End Sub
End Class
Public Class LATIHAN034C_46109006
BalasHapusDim SRY As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;jet oledb:database password=10")
Dim Pencarian As New ByIskandar.PencarianKeDataBaseByIskandar
Private Sub TAMBAH()
If t146109006.Text.Length = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If t246109006.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(t346109006.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(t446109006.Text) = 0 Then
MsgBox("JUMLAH BELUM TERISI")
Exit Sub
End If
Pencarian.AturPenPencariananDataBase("barang", "kode barang", t146109006.Text, 1, SRY)
If Pencarian.JumlanBaris > 0 Then
MsgBox("kode sudah ada")
Exit Sub
End If
Dim KI2 As New OleDb.OleDbCommand
KI2 = New OleDb.OleDbCommand("insert into barang(kodebarang,namabarang,hargajual,jumlahbarang) Values('" & t146109006.Text & "','" & t2346109006.Text & "'," & Val(t346109006.Text) & "," & Val(t446109006.Text) & ")", SRY)
SRY.Open()
KI2.ExecuteNonQuery()
SRY.Close()
KI2.Dispose()
t146109006.Text = ""
t246109006.Text = ""
t346109006.Text = ""
t446109006.Text = ""
End Sub
End Class
Andi Muh. Yusri
BalasHapus46109038
Public Class Latihan34A_46109038
Private Sub DaftarBarangToolStripLabel_46109038_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles DaftarBarangToolStripLabel_46109038.Click
If Latihan34B_46109038.Visible = False Then
Latihan34B_46109038.MdiParent = Me.MdiParent
Latihan34B_46109038.Show()
Else
Latihan34B_46109038.Activate()
End If
End Sub
Private Sub InputBarang_46109038_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles InputBarang_46109038.Click
If Latihan34C_46109038.Visible = False Then
Latihan34C_46109038.MdiParent = Me.MdiParent
Latihan34C_46109038.Show()
Else
Latihan34C_46109038.Activate()
End If
End Sub
Private Sub ToolStripButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click
If Latihan34B_46109038.Visible = False Then
Latihan34B_46109038.MdiParent = Me.MdiParent
Latihan34B_46109038.Show()
Else
Latihan34B_46109038.Activate()
End If
End Sub
Private Sub ToolStripButton2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click
If Latihan34C_46109038.Visible = False Then
Latihan34C_46109038.MdiParent = Me.MdiParent
Latihan34C_46109038.Show()
Else
Latihan34C_46109038.Activate()
End If
End Sub
End Class
Public Class Latihan34A46109047
BalasHapusPrivate Sub TSL146109047_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TSL146109047.Click
If Latihan34B46109047.Visible = False Then
Latihan34B46109047.MdiParent = Me.MdiParent
Latihan34B46109047.Show()
Else
Latihan34B46109047.Activate()
End If
End Sub
Private Sub TSL246109047_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TSL246109047.Click
If Latihan34C46109047.Visible = False Then
Latihan34C46109047.MdiParent = Me.MdiParent
Latihan34C46109047.Show()
Else
Latihan34C46109047.Activate()
End If
End Sub
Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click
If Latihan34B46109047.Visible = False Then
Latihan34B46109047.MdiParent = Me.MdiParent
Latihan34B46109047.Show()
Else
Latihan34B46109047.Activate()
End If
End Sub
Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click
If Latihan34C46109047.Visible = False Then
Latihan34C46109047.MdiParent = Me.MdiParent
Latihan34C46109047.Show()
Else
Latihan34C46109047.Activate()
End If
End Sub
End Class
Public Class Latihan34C46109047
BalasHapusDim itha As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:database password=979264")
Dim CARI As New ByIskandar.CariKeDataBaseByIskandar
Private Sub TAMBAH()
If TB146109047.Text.Length = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If TB246109047.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(TB346109047.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(TB446109047.Text) = 0 Then
MsgBox("JUMLAH BELUM TERISI")
Exit Sub
End If
CARI.AturPencarianDataBase("barang", "kode barang", TB146109047.Text, 1, itha)
If CARI.JumlanBaris > 0 Then
MsgBox("kode sudah ada")
Exit Sub
End If
Dim muhitha As New OleDb.OleDbCommand
muhitha = New OleDb.OleDbCommand("insert into barang(kodebarang,namabarang,hargajual,jumlahbarang) Values('" & TB146109047.Text & "','" & TB246109047.Text & "'," & Val(TB346109047.Text) & "," & Val(TB446109047.Text) & ")", itha)
itha.Open()
muhitha.ExecuteNonQuery()
itha.Close()
muhitha.Dispose()
TB146109047.Text = ""
TB246109047.Text = ""
TB346109047.Text = ""
TB446109047.Text = ""
Latihan33A46109047.saya()
End Sub
Private Sub EDIT()
If TB146109047.Text.Length = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If TB246109047.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(TB346109047.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(TB446109047.Text) = 0 Then
MsgBox("JUMLAH BELUM TERISI")
Exit Sub
End If
If KB46109047.Text <> TB146109047.Text Then
CARI.AturPencarianDataBase("barang", "kode barang", TB146109047.Text, 1, itha)
If CARI.JumlanBaris > 0 Then
MsgBox("kode sudah ada")
Exit Sub
End If
End If
Dim com As New OleDb.OleDbCommand
com = New OleDb.OleDbCommand("update barang set kodebarang ='" & TB146109047.Text & "',namabarang='" & TB246109047.Text & "',hargajual=" & Val(TB346109047.Text) & ", jumlahbarang=" & Val(TB446109047.Text) & "where kodebarang='" & KB46109047.Text & "'", itha)
itha.Open()
com.ExecuteNonQuery()
itha.Close()
com.Dispose()
TB146109047.Text = ""
TB246109047.Text = ""
TB346109047.Text = ""
TB446109047.Text = ""
KB46109047.Text = "-"
Latihan33A46109047.saya()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If KB46109047.Text = "-" Then
TAMBAH()
Else
EDIT()
End If
End Sub
End Class
LATIHAN 034A
BalasHapusPublic Class LATIHAN034A_46109020
Private Sub DB46109020_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DB46109020.Click
If LATIHAN034B_46109020.Visible = False Then
LATIHAN034B_46109020.MdiParent = Me.MdiParent
LATIHAN034B_46109020.Show()
Else
LATIHAN034B_46109020.Activate()
End If
End Sub
Private Sub ib46109020_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ib46109020.Click
If LATIHAN034C_46109020.Visible = False Then
LATIHAN034C_46109020.MdiParent = Me.MdiParent
LATIHAN034C_46109020.Show()
Else
LATIHAN034C_46109020.Activate()
End If
End Sub
Private Sub DAFTARBARANGToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DAFTARBARANGToolStripMenuItem.Click
If LATIHAN034B_46109020.Visible = False Then
LATIHAN034B_46109020.MdiParent = Me.MdiParent
LATIHAN034B_46109020.Show()
Else
LATIHAN034B_46109020.Activate()
End If
End Sub
Private Sub INPUTBARANGToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles INPUTBARANGToolStripMenuItem.Click
If LATIHAN034C_46109020.Visible = False Then
LATIHAN034C_46109020.MdiParent = Me.MdiParent
LATIHAN034C_46109020.Show()
Else
LATIHAN034C_46109020.Activate()
End If
End Sub
End Class
Public Class Latihan034A_46109015
BalasHapusPrivate Sub DAFTARBARANGToolStripMenuItem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles DAFTARBARANGToolStripMenuItem.Click
If Latihan034B_46109015.Visible = False Then
Latihan034B_46109015.MdiParent = Me.MdiParent
Latihan034B_46109015.Show()
Else
Latihan034B_46109015.Activate()
End If
End Sub
Private Sub INPUTBARANGToolStripMenuItem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles INPUTBARANGToolStripMenuItem.Click
If Latihan034C_46109015.Visible = False Then
Latihan034C_46109015.MdiParent = Me.MdiParent
Latihan034C_46109015.Show()
Else
Latihan034C_46109015.Activate()
End If
End Sub
Private Sub ToolStripButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click
If Latihan034B_46109015.Visible = False Then
Latihan034B_46109015.MdiParent = Me.MdiParent
Latihan034B_46109015.Show()
Else
Latihan034B_46109015.Activate()
End If
End Sub
Private Sub ToolStripButton2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click
If Latihan034C_46109015.Visible = False Then
Latihan034C_46109015.MdiParent = Me.MdiParent
Latihan034C_46109015.Show()
Else
Latihan034C_46109015.Activate()
End If
End Sub
End Class
Public Class Latihan034C_46109015
BalasHapusDim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\DATABARANG.accdb;Jet OLEDB:Database Password=015")
Dim cari As New ByIskandar.CariKeDataBaseByIskandar
Private Sub TAMBAH()
If t1_46109015.Text.Length = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If t2_46109015.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(t3_46109015.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(t4_46109015.Text) = 0 Then
MsgBox("JUMLAH BELUM TERISI")
Exit Sub
End If
cari.AturPencarianDataBase("barang", "kode barang", t1_46109015.Text, 1, conect)
If cari.JumlanBaris > 0 Then
MsgBox("kode sudah ada")
Exit Sub
End If
Dim com As New OleDb.OleDbCommand
com = New OleDb.OleDbCommand("insert into barang(kodebarang,namabarang,hargajual,jumlahbarang) Values('" & t1_46109015.Text & "','" & t3_46109015.Text & "'," & Val(t3_46109015.Text) & "," & Val(t4_46109015.Text) & ")", conect)
conect.Open()
com.ExecuteNonQuery()
conect.Close()
com.Dispose()
t1_46109015.Text = ""
t2_46109015.Text = ""
t3_46109015.Text = ""
t4_46109015.Text = ""
Latihan033A_46109015.imah()
End Sub
Private Sub EDIT()
If t1_46109015.Text.Length = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If t2_46109015.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(t3_46109015.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(t4_46109015.Text) = 0 Then
MsgBox("JUMLAH BELUM TERISI")
Exit Sub
End If
If KB_46109015.Text <> t1_46109015.Text Then
cari.AturPencarianDataBase("barang", "kode barang", t1_46109015.Text, 1, conect)
If cari.JumlanBaris > 0 Then
MsgBox("kode sudah ada")
Exit Sub
End If
End If
Dim com As New OleDb.OleDbCommand
com = 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='" & KB_46109015.Text & "'", conect)
conect.Open()
com.ExecuteNonQuery()
conect.Close()
com.Dispose()
t1_46109015.Text = ""
t2_46109015.Text = ""
t3_46109015.Text = ""
t4_46109015.Text = ""
KB_46109015.Text = "-"
End Sub
Private Sub Button136109038_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1_46109015.Click
If KB_46109015.Text = "-" Then
TAMBAH()
Else
EDIT()
End If
End Sub
End Class
Public Class Latihan34_A_46109044
BalasHapusPrivate Sub DAFTARBARANGToolStripMenuItem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles DAFTARBARANGToolStripMenuItem.Click
If Latihan34_B_46109044.Visible = False Then
Latihan34_B_46109044.MdiParent = Me.MdiParent
Latihan34_B_46109044.Show()
Else
Latihan34_B_46109044.Activate()
End If
End Sub
Private Sub INPUTBARANGToolStripMenuItem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles INPUTBARANGToolStripMenuItem.Click
If Latihan34_C_46109044.Visible = False Then
Latihan34_C_46109044.MdiParent = Me.MdiParent
Latihan34_C_46109044.Show()
Else
Latihan34_C_46109044.Activate()
End If
End Sub
Private Sub ToolStripButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click
If Latihan34_B_46109044.Visible = False Then
Latihan34_B_46109044.MdiParent = Me.MdiParent
Latihan34_B_46109044.Show()
Else
Latihan34_B_46109044.Activate()
End If
End Sub
Private Sub ToolStripButton2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click
If Latihan34_C_46109044.Visible = False Then
Latihan34_C_46109044.MdiParent = Me.MdiParent
Latihan34_C_46109044.Show()
Else
Latihan34_C_46109044.Activate()
End If
End Sub
End Class
Public Class LATIHAN34A46109026
BalasHapusPrivate Sub DAFTARBARANGToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DAFTARBARANGToolStripMenuItem.Click
If LATIHAN34B46109026.Visible = False Then
LATIHAN34B46109026.MdiParent = Me.MdiParent
LATIHAN34B46109026.Show()
Else
LATIHAN34B46109026.Activate()
End If
End Sub
Private Sub INPUTBARANGToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles INPUTBARANGToolStripMenuItem.Click
If LATIHAN34C46109026.Visible = False Then
LATIHAN34C46109026.MdiParent = Me.MdiParent
LATIHAN34C46109026.Show()
Else
LATIHAN34C46109026.Activate()
End If
End Sub
Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click
If LATIHAN34B46109026.Visible = False Then
LATIHAN34B46109026.MdiParent = Me.MdiParent
LATIHAN34B46109026.Show()
Else
LATIHAN34B46109026.Activate()
End If
End Sub
Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click
If LATIHAN34C46109026.Visible = False Then
LATIHAN34C46109026.MdiParent = Me.MdiParent
LATIHAN34C46109026.Show()
Else
LATIHAN34C46109026.Activate()
End If
End Sub
End Class
Public Class LATIHAN34C46109026
BalasHapusDim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\DATABARANG.accdb;Jet OLEDB:Database Password=26")
Dim cari As New ByIskandar.CariKeDataBaseByIskandar
Private Sub TAMBAH()
If kb46109026.Text.Length = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If nb46109026.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(hj46109026.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(jb46109026.Text) = 0 Then
MsgBox("JUMLAH BELUM TERISI")
Exit Sub
End If
cari.AturPencarianDataBase("barang", "kode barang", kb46109026.Text, 1, conect)
If cari.JumlanBaris > 0 Then
MsgBox("kode sudah ada")
Exit Sub
End If
Dim com As New OleDb.OleDbCommand
com = New OleDb.OleDbCommand("insert into barang(kodebarang,namabarang,hargajual,jumlahbarang) Values('" & kb46109026.Text & "','" & nb46109026.Text & "'," & Val(hj46109026.Text) & "," & Val(jb46109026.Text) & ")", conect)
conect.Open()
com.ExecuteNonQuery()
conect.Close()
com.Dispose()
kb46109026.Text = ""
nb46109026.Text = ""
hj46109026.Text = ""
jb46109026.Text = ""
End Sub
Private Sub EDIT()
If kb46109026.Text.Length = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If nb46109026.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(hj46109026.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(jb46109026.Text) = 0 Then
MsgBox("JUMLAH BELUM TERISI")
Exit Sub
End If
If KB.Text <> kb46109026.Text Then
cari.AturPencarianDataBase("barang", "kode barang", kb46109026.Text, 1, conect)
If cari.JumlanBaris > 0 Then
MsgBox("kode sudah ada")
Exit Sub
End If
End If
Dim com As New OleDb.OleDbCommand
com = New OleDb.OleDbCommand("update barang set kodebarang ='" & kb46109026.Text & "',namabarang='" & nb46109026.Text & "',hargajual=" & Val(hj46109026.Text) & ", jumlahbarang=" & Val(jb46109026.Text) & "where kodebarang='" & KB.Text & "'", conect)
conect.Open()
com.ExecuteNonQuery()
conect.Close()
com.Dispose()
kb46109026.Text = ""
nb46109026.Text = ""
hj46109026.Text = ""
jb46109026.Text = ""
KB.Text = "-"
End Sub
Private Sub LATIHAN34C46109026_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If KB.Text = "-" Then
TAMBAH()
Else
EDIT()
End If
End Sub
End Class
Public Class Form34A
BalasHapusPrivate Sub TSL1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles TSL1.Click
If Form34B.Visible = False Then
Form34B.MdiParent = Me.MdiParent
Form34B.Show()
Else
Form34B.Activate()
End If
End Sub
Private Sub TSL2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles TSL2.Click
If Form34C.Visible = False Then
Form34C.MdiParent = Me.MdiParent
Form34C.Show()
Else
Form34C.Activate()
End If
End Sub
Private Sub ToolStripButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click
If Form34B.Visible = False Then
Form34B.MdiParent = Me.MdiParent
Form34B.Show()
Else
Form34B.Activate()
End If
End Sub
Private Sub ToolStripButton2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click
If Form34C.Visible = False Then
Form34C.MdiParent = Me.MdiParent
Form34C.Show()
Else
Form34C.Activate()
End If
End Sub
End Class
Public Class Form34C
BalasHapusDim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\DATABARANG.accdb;Jet OLEDB:Database Password=allah swt")
Dim cari As New ByIskandar.CariKeDataBaseByIskandar
Private Sub TAMBAH()
If vd1_052.Text.Length = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If vd2_052.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(vd3_052.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(vd4_052.Text) = 0 Then
MsgBox("JUMLAH BELUM TERISI")
Exit Sub
End If
cari.AturPencarianDataBase("barang", "kode barang", vd1_052.Text, 1, conect)
If cari.JumlanBaris > 0 Then
MsgBox("kode sudah ada")
Exit Sub
End If
Dim com As New OleDb.OleDbCommand
com = New OleDb.OleDbCommand("insert into barang(kodebarang,namabarang,hargajual,jumlahbarang) Values('" & vd1_052.Text & "','" & vd2_052.Text & "'," & Val(vd3_052.Text) & "," & Val(vd4_052.Text) & ")", conect)
conect.Open()
com.ExecuteNonQuery()
conect.Close()
com.Dispose()
vd1_052.Text = ""
vd2_052.Text = ""
vd3_052.Text = ""
vd4_052.Text = ""
Form33A.vesa()
End Sub
Private Sub EDIT()
If vd1_052.Text.Length = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If vd2_052.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(vd3_052.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(vd4_052.Text) = 0 Then
MsgBox("JUMLAH BELUM TERISI")
Exit Sub
End If
If KB.Text <> vd1_052.Text Then
cari.AturPencarianDataBase("barang", "kode barang", vd1_052.Text, 1, conect)
If cari.JumlanBaris > 0 Then
MsgBox("kode sudah ada")
Exit Sub
End If
End If
Dim com As New OleDb.OleDbCommand
com = 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 & "'", conect)
conect.Open()
com.ExecuteNonQuery()
conect.Close()
com.Dispose()
vd1_052.Text = ""
vd2_052.Text = ""
vd3_052.Text = ""
vd4_052.Text = ""
KB.Text = "-"
Form32A.vesa()
End Sub
Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
If KB.Text = "-" Then
TAMBAH()
Else
EDIT()
End If
End Sub
End Class
http://kumpulanlatihan46109060.blogspot.com/2011/11/latihan-34.html
BalasHapushttp://taufiqgooners.blogspot.com/2011/11/latihan-34-apkom.html
BalasHapushttp://irvanbravely.blogspot.com/2011/11/latihan-34-apkom.html
BalasHapusPublic Class Form34_A_46109043
BalasHapusPrivate Sub DAFTARBARANGToolStripMenuItem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles DAFTARBARANGToolStripMenuItem.Click
If Form34_B_46109043.Visible = False Then
Form34_B_46109043.MdiParent = Me.MdiParent
Form34_B_46109043.Show()
Else
Form34_B_46109043.Activate()
End If
End Sub
Private Sub INPUTBARANGToolStripMenuItem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles INPUTBARANGToolStripMenuItem.Click
If Form34_C_46109043.Visible = False Then
Form34_C_46109043.MdiParent = Me.MdiParent
Form34_C_46109043.Show()
Else
Form34_C_46109043.Activate()
End If
End Sub
Private Sub ToolStripButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click
If Form34_B_46109043.Visible = False Then
Form34_B_46109043.MdiParent = Me.MdiParent
Form34_B_46109043.Show()
Else
Form34_B_46109043.Activate()
End If
End Sub
Private Sub ToolStripButton2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click
If Form34_C_46109043.Visible = False Then
Form34_C_46109043.MdiParent = Me.MdiParent
Form34_C_46109043.Show()
Else
Form34_C_46109043.Activate()
End If
End Sub
End Class
Public Class Form34_A_46109043
BalasHapusPrivate Sub DAFTARBARANGToolStripMenuItem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles DAFTARBARANGToolStripMenuItem.Click
If Form34_B_46109043.Visible = False Then
Form34_B_46109043.MdiParent = Me.MdiParent
Form34_B_46109043.Show()
Else
Form34_B_46109043.Activate()
End If
End Sub
Private Sub INPUTBARANGToolStripMenuItem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles INPUTBARANGToolStripMenuItem.Click
If Form34_C_46109043.Visible = False Then
Form34_C_46109043.MdiParent = Me.MdiParent
Form34_C_46109043.Show()
Else
Form34_C_46109043.Activate()
End If
End Sub
Private Sub ToolStripButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click
If Form34_B_46109043.Visible = False Then
Form34_B_46109043.MdiParent = Me.MdiParent
Form34_B_46109043.Show()
Else
Form34_B_46109043.Activate()
End If
End Sub
Private Sub ToolStripButton2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click
If Form34_C_46109043.Visible = False Then
Form34_C_46109043.MdiParent = Me.MdiParent
Form34_C_46109043.Show()
Else
Form34_C_46109043.Activate()
End If
End Sub
End Class
Public Class latihan_34A_46109044
BalasHapusPrivate Sub daftar46109044_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles daftar46109044.Click
If latihan_34B_46109044.Visible = False Then
latihan_34B_46109044.MdiParent = Me.MdiParent
latihan_34B_46109044.Show()
Else
latihan_34B_46109044.Activate()
End If
End Sub
Private Sub input46109044_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles input46109044.Click
If latihan_34C_46109044.Visible = False Then
latihan_34C_46109044.MdiParent = Me.MdiParent
latihan_34C_46109044.Show()
Else
latihan_34C_46109044.Activate()
End If
End Sub
Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click
If latihan_34B_46109044.Visible = False Then
latihan_34B_46109044.MdiParent = Me.MdiParent
latihan_34B_46109044.Show()
Else
latihan_34B_46109044.Activate()
End If
End Sub
End Class