Latihan 32A
Public Class Form32A_36109020
Dim dtb As New DataTable
Dim ksr As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.ACCDB")
Public Sub dhedhe()
Dim daf As New OleDb.OleDbDataAdapter
daf = New OleDb.OleDbDataAdapter("select * from barang", ksr)
dtb.Rows.Clear()
daf.Fill(dtb)
daf.Dispose()
End Sub
Private Sub Latihan_32A_022_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
dhedhe()
dgv_36109020.DataSource = dtb
End Sub
Private Sub tambah_36109020_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tambah_36109020.Click
If Form32B_36109020.Visible = False Then
Form32B_36109020.Show()
Else
Form32B_36109020.Activate()
End If
End Sub
Private Sub edit_36109020_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles edit_36109020.Click
If Form32C_36109020.Visible = False Then
Form32C_36109020.Show()
Else
Form32C_36109020.Activate()
End If
Form32C_36109020.t1_36109020.Text = dgv_36109020.CurrentRow.Cells("kodebarang").Value
Form32C_36109020.t2_36109020.Text = dgv_36109020.CurrentRow.Cells("namabarang").Value
Form32C_36109020.t3_36109020.Text = dgv_36109020.CurrentRow.Cells("hargajual").Value
Form32C_36109020.t4_36109020.Text = dgv_36109020.CurrentRow.Cells("jumlahbarang").Value
Form32C_36109020.KB_36109020.Text = dgv_36109020.CurrentRow.Cells("kodebarang").Value
Form32C_36109020.Show()
End Sub
End Class
Latihan 32B
Public Class Form32B_36109020
Dim dhedhe As New ByIskandar.CariKeDataBaseByIskandar
Dim cmnd As New OleDb.OleDbCommand
Dim ksr As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.ACCDB")
Private Sub save_36109020_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles save_36109020.Click
If t1_36109020.Text.Length = 0 Then
MsgBox("Fill the blank")
Exit Sub
End If
If t2_36109020.Text.Length = 0 Then
MsgBox("Fill the blank")
Exit Sub
End If
If Val(t3_36109020.Text) = 0 Then
MsgBox("Fill the blank")
Exit Sub
End If
If Val(t4_36109020.Text) = 0 Then
MsgBox("Fill the blank")
Exit Sub
End If
dhedhe.AturPencarianDataBase("Barang", "KodeBarang", t1_36109020.Text, 1, ksr)
If dhedhe.JumlanBaris > 0 Then
MsgBox("kode seperti sudah ada")
Exit Sub
End If
cmnd = New OleDb.OleDbCommand("insert into barang (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & t1_36109020.Text & "','" & t2_36109020.Text & "'," & Val(t3_36109020.Text) & "," & Val(t4_36109020.Text) & ")", ksr)
ksr.Open()
cmnd.ExecuteNonQuery()
ksr.Close()
cmnd.Dispose()
t1_36109020.Text = ""
t2_36109020.Text = ""
t3_36109020.Text = ""
t4_36109020.Text = ""
Form32A_36109020.dhedhe()
End Sub
End Class
Latihan 32C
Public Class Form32C_36109020
Dim dhedhe As New ByIskandar.CariKeDataBaseByIskandar
Dim cmnd As New OleDb.OleDbCommand
Dim ksr As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.ACCDB")
Private Sub save_36109020_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles save_36109020.Click
If t1_36109020.Text.Length = 0 Then
MsgBox("Fill the blank")
Exit Sub
End If
If t2_36109020.Text.Length = 0 Then
MsgBox("Fill the blank")
Exit Sub
End If
If Val(t3_36109020.Text) = 0 Then
MsgBox("Fill the blank")
Exit Sub
End If
If Val(t4_36109020.Text) = 0 Then
MsgBox("Fill the blank")
Exit Sub
End If
If t1_36109020.Text <> KB_36109020.Text Then
dhedhe.AturPencarianDataBase("Barang", "KodeBarang", t1_36109020.Text, 1, ksr)
If dhedhe.JumlanBaris > 0 Then
MsgBox("Kode Seperti itu sudah ada")
Exit Sub
End If
End If
cmnd = New OleDb.OleDbCommand("update barang set kodebarang = '" & t1_36109020.Text & "', namabarang = '" & t2_36109020.Text & "', hargajual = " & Val(t3_36109020.Text) & ", jumlahbarang = " & Val(t4_36109020.Text) & " where kodebarang = '" & KB_36109020.Text & "'", ksr)
ksr.Open()
cmnd.ExecuteNonQuery()
ksr.Close()
cmnd.Dispose()
t1_36109020.Text = ""
t2_36109020.Text = ""
t3_36109020.Text = ""
t4_36109020.Text = ""
KB_36109020.Text = ""
Form32A_36109020.dhedhe()
End Sub
End Class
Rabu, 23 November 2011
Kamis, 17 November 2011
Latihan 31B
Public Class Form31B_36109020
Dim dhedhe As New ByIskandar.CariKeDataBaseByIskandar
Dim cmnd As New OleDb.OleDbCommand
Dim ksr As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.ACCDB")
Private Sub simpan_36109020_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles simpan_36109020.Click
If t1_36109020.Text.Length = 0 Then
MsgBox("Fill the blank")
Exit Sub
End If
If t2_36109020.Text.Length = 0 Then
MsgBox("Fill the blank")
Exit Sub
End If
If Val(t3_36109020.Text) = 0 Then
MsgBox("Fill the blank")
Exit Sub
End If
If Val(t4_36109020.Text) = 0 Then
MsgBox("Fill the blank")
Exit Sub
End If
If t1_36109020.Text <> KB_36109020.Text Then
dhedhe.AturPencarianDataBase("Barang", "KodeBarang", t1_36109020.Text, 1, ksr)
If dhedhe.JumlanBaris > 0 Then
MsgBox("Sudah ada kode barang seperti itu")
Exit Sub
End If
End If
cmnd = New OleDb.OleDbCommand("update barang set kodebarang = '" & t1_36109020.Text & "', namabarang = '" & t2_36109020.Text & "', hargajual = " & Val(t3_36109020.Text) & ", jumlahbarang = " & Val(t4_36109020.Text) & " where kodebarang = '" & KB_36109020.Text & "'", ksr)
ksr.Open()
cmnd.ExecuteNonQuery()
ksr.Close()
cmnd.Dispose()
t1_36109020.Text = ""
t2_36109020.Text = ""
t3_36109020.Text = ""
t4_36109020.Text = ""
KB_36109020.Text = "-"
Form31A_36109020.dhedhe()
End Sub
End Class
Dim dhedhe As New ByIskandar.CariKeDataBaseByIskandar
Dim cmnd As New OleDb.OleDbCommand
Dim ksr As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.ACCDB")
Private Sub simpan_36109020_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles simpan_36109020.Click
If t1_36109020.Text.Length = 0 Then
MsgBox("Fill the blank")
Exit Sub
End If
If t2_36109020.Text.Length = 0 Then
MsgBox("Fill the blank")
Exit Sub
End If
If Val(t3_36109020.Text) = 0 Then
MsgBox("Fill the blank")
Exit Sub
End If
If Val(t4_36109020.Text) = 0 Then
MsgBox("Fill the blank")
Exit Sub
End If
If t1_36109020.Text <> KB_36109020.Text Then
dhedhe.AturPencarianDataBase("Barang", "KodeBarang", t1_36109020.Text, 1, ksr)
If dhedhe.JumlanBaris > 0 Then
MsgBox("Sudah ada kode barang seperti itu")
Exit Sub
End If
End If
cmnd = New OleDb.OleDbCommand("update barang set kodebarang = '" & t1_36109020.Text & "', namabarang = '" & t2_36109020.Text & "', hargajual = " & Val(t3_36109020.Text) & ", jumlahbarang = " & Val(t4_36109020.Text) & " where kodebarang = '" & KB_36109020.Text & "'", ksr)
ksr.Open()
cmnd.ExecuteNonQuery()
ksr.Close()
cmnd.Dispose()
t1_36109020.Text = ""
t2_36109020.Text = ""
t3_36109020.Text = ""
t4_36109020.Text = ""
KB_36109020.Text = "-"
Form31A_36109020.dhedhe()
End Sub
End Class
Latihan 31A
Public Class Form31A_36109020
Dim dtb As New DataTable
Dim ksr As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.ACCDB")
Public Sub dhedhe()
Dim df As New OleDb.OleDbDataAdapter
df = New OleDb.OleDbDataAdapter("select * from barang", ksr)
dtb.Rows.Clear()
df.Fill(dtb)
df.Dispose()
End Sub
Private Sub Form31A_36109020_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
dhedhe()
dgv_36109020.DataSource = dtb
End Sub
Private Sub edit_36109020_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles edit_36109020.Click
If Form31B_36109020.Visible = False Then
Form31B_36109020.Show()
Else
Form31B_36109020.Activate()
End If
Form31B_36109020.t1_36109020.Text = dgv_36109020.CurrentRow.Cells("kodebarang").Value
Form31B_36109020.t2_36109020.Text = dgv_36109020.CurrentRow.Cells("namabarang").Value
Form31B_36109020.t3_36109020.Text = dgv_36109020.CurrentRow.Cells("hargajual").Value
Form31B_36109020.t4_36109020.Text = dgv_36109020.CurrentRow.Cells("jumlahbarang").Value
Form31B_36109020.KB_36109020.Text = dgv_36109020.CurrentRow.Cells("jumlahbarang").Value
Form31B_36109020.Show()
End Sub
End Class
Dim dtb As New DataTable
Dim ksr As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.ACCDB")
Public Sub dhedhe()
Dim df As New OleDb.OleDbDataAdapter
df = New OleDb.OleDbDataAdapter("select * from barang", ksr)
dtb.Rows.Clear()
df.Fill(dtb)
df.Dispose()
End Sub
Private Sub Form31A_36109020_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
dhedhe()
dgv_36109020.DataSource = dtb
End Sub
Private Sub edit_36109020_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles edit_36109020.Click
If Form31B_36109020.Visible = False Then
Form31B_36109020.Show()
Else
Form31B_36109020.Activate()
End If
Form31B_36109020.t1_36109020.Text = dgv_36109020.CurrentRow.Cells("kodebarang").Value
Form31B_36109020.t2_36109020.Text = dgv_36109020.CurrentRow.Cells("namabarang").Value
Form31B_36109020.t3_36109020.Text = dgv_36109020.CurrentRow.Cells("hargajual").Value
Form31B_36109020.t4_36109020.Text = dgv_36109020.CurrentRow.Cells("jumlahbarang").Value
Form31B_36109020.KB_36109020.Text = dgv_36109020.CurrentRow.Cells("jumlahbarang").Value
Form31B_36109020.Show()
End Sub
End Class
Latihan 30B
Public Class Form30B_36109020
Dim cmnd As New OleDb.OleDbCommand
Dim dhedhe As New ByIskandar.CariKeDataBaseByIskandar
Dim ksr As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.ACCDB")
Private Sub simpan_36109020_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles simpan_36109020.Click
If t1_36109020.Text.Length = 0 Then
MsgBox("fill the blank please")
Exit Sub
End If
If t2_36109020.Text.Length = 0 Then
MsgBox("fill the blank please")
Exit Sub
End If
If Val(t3_36109020.Text) = 0 Then
MsgBox("fill the blank please")
Exit Sub
End If
If Val(t4_36109020.Text) = 0 Then
MsgBox("fill the blank please")
Exit Sub
End If
If kb_36109020.Text <> t1_36109020.Text Then
dhedhe.AturPencarianDataBase("Barang", "KodeBarang", t1_36109020.Text, 1, ksr)
If dhedhe.JumlanBaris > 0 Then
MsgBox("Kode sudah ada")
Exit Sub
End If
End If
cmnd = New OleDb.OleDbCommand("update barang set kodebarang = '" & t1_36109020.Text & "', namabarang = '" & t2_36109020.Text & "', hargajual = " & Val(t3_36109020.Text) & ", jumlahbarang = " & Val(t4_36109020.Text) & " where kodebarang = '" & kb_36109020.Text & "'", ksr)
ksr.Open()
cmnd.ExecuteNonQuery()
ksr.Close()
cmnd.Dispose()
kb_36109020.Text = ""
t1_36109020.Text = ""
t2_36109020.Text = ""
t3_36109020.Text = ""
t4_36109020.Text = ""
End Sub
End Class
Dim cmnd As New OleDb.OleDbCommand
Dim dhedhe As New ByIskandar.CariKeDataBaseByIskandar
Dim ksr As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.ACCDB")
Private Sub simpan_36109020_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles simpan_36109020.Click
If t1_36109020.Text.Length = 0 Then
MsgBox("fill the blank please")
Exit Sub
End If
If t2_36109020.Text.Length = 0 Then
MsgBox("fill the blank please")
Exit Sub
End If
If Val(t3_36109020.Text) = 0 Then
MsgBox("fill the blank please")
Exit Sub
End If
If Val(t4_36109020.Text) = 0 Then
MsgBox("fill the blank please")
Exit Sub
End If
If kb_36109020.Text <> t1_36109020.Text Then
dhedhe.AturPencarianDataBase("Barang", "KodeBarang", t1_36109020.Text, 1, ksr)
If dhedhe.JumlanBaris > 0 Then
MsgBox("Kode sudah ada")
Exit Sub
End If
End If
cmnd = New OleDb.OleDbCommand("update barang set kodebarang = '" & t1_36109020.Text & "', namabarang = '" & t2_36109020.Text & "', hargajual = " & Val(t3_36109020.Text) & ", jumlahbarang = " & Val(t4_36109020.Text) & " where kodebarang = '" & kb_36109020.Text & "'", ksr)
ksr.Open()
cmnd.ExecuteNonQuery()
ksr.Close()
cmnd.Dispose()
kb_36109020.Text = ""
t1_36109020.Text = ""
t2_36109020.Text = ""
t3_36109020.Text = ""
t4_36109020.Text = ""
End Sub
End Class
Latihan 30A
Public Class Form30A_36109020
Dim dtb As New DataTable
Dim ksr As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.ACCDB")
Public Sub dhedhe()
Dim df As New OleDb.OleDbDataAdapter
df = New OleDb.OleDbDataAdapter("select * from barang", ksr)
dtb.Rows.Clear()
df.Fill(dtb)
df.Dispose()
End Sub
Private Sub Form30A_36109020_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
dhedhe()
dgv_36109020.DataSource = dtb
End Sub
Private Sub edit_36109020_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles edit_36109020.Click
If Form30B_36109020.Visible = False Then
Form30B_36109020.Show()
Else
Form30B_36109020.Activate()
End If
Form30B_36109020.kb_36109020.Text = dgv_36109020.CurrentRow.Cells("kodebarang").Value
Form30B_36109020.t1_36109020.Text = dgv_36109020.CurrentRow.Cells("kodebarang").Value
Form30B_36109020.t2_36109020.Text = dgv_36109020.CurrentRow.Cells("namabarang").Value
Form30B_36109020.t3_36109020.Text = dgv_36109020.CurrentRow.Cells("hargajual").Value
Form30B_36109020.t4_36109020.Text = dgv_36109020.CurrentRow.Cells("jumlahbarang").Value
Form30B_36109020.Show()
End Sub
End Class
Dim dtb As New DataTable
Dim ksr As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.ACCDB")
Public Sub dhedhe()
Dim df As New OleDb.OleDbDataAdapter
df = New OleDb.OleDbDataAdapter("select * from barang", ksr)
dtb.Rows.Clear()
df.Fill(dtb)
df.Dispose()
End Sub
Private Sub Form30A_36109020_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
dhedhe()
dgv_36109020.DataSource = dtb
End Sub
Private Sub edit_36109020_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles edit_36109020.Click
If Form30B_36109020.Visible = False Then
Form30B_36109020.Show()
Else
Form30B_36109020.Activate()
End If
Form30B_36109020.kb_36109020.Text = dgv_36109020.CurrentRow.Cells("kodebarang").Value
Form30B_36109020.t1_36109020.Text = dgv_36109020.CurrentRow.Cells("kodebarang").Value
Form30B_36109020.t2_36109020.Text = dgv_36109020.CurrentRow.Cells("namabarang").Value
Form30B_36109020.t3_36109020.Text = dgv_36109020.CurrentRow.Cells("hargajual").Value
Form30B_36109020.t4_36109020.Text = dgv_36109020.CurrentRow.Cells("jumlahbarang").Value
Form30B_36109020.Show()
End Sub
End Class
Latihan 29
Public Class Form29_36109020
Dim cmnd As New OleDb.OleDbCommand
Dim dhedhe As New ByIskandar.CariKeDataBaseByIskandar
Dim ksr As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.ACCDB")
Private Sub save_36109020_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles save_36109020.Click
If t1_36109020.Text.Length = 0 Then
MsgBox("fill the blank please")
Exit Sub
End If
If t2_36109020.Text.Length = 0 Then
MsgBox("fill the blank please")
Exit Sub
End If
If Val(t3_36109020.Text) = 0 Then
MsgBox("fill the blank please")
Exit Sub
End If
If Val(t4_36109020.Text) = 0 Then
MsgBox("fill the blank please")
Exit Sub
End If
If kb_36109020.Text <> t1_36109020.Text Then
dhedhe.AturPencarianDataBase("Barang", "KodeBarang", t1_36109020.Text, 1, ksr)
If dhedhe.JumlanBaris > 0 Then
MsgBox("Kode sudah ada")
Exit Sub
End If
End If
cmnd = New OleDb.OleDbCommand("update barang set kodebarang = '" & t1_36109020.Text & "', namabarang = '" & t2_36109020.Text & "', hargajual = " & Val(t3_36109020.Text) & ", jumlahbarang = " & Val(t4_36109020.Text) & " where kodebarang = '" & kb_36109020.Text & "'", ksr)
ksr.Open()
cmnd.ExecuteNonQuery()
ksr.Close()
cmnd.Dispose()
kb_36109020.Text = ""
t1_36109020.Text = ""
t2_36109020.Text = ""
t3_36109020.Text = ""
t4_36109020.Text = ""
End Sub
End Class
Dim cmnd As New OleDb.OleDbCommand
Dim dhedhe As New ByIskandar.CariKeDataBaseByIskandar
Dim ksr As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.ACCDB")
Private Sub save_36109020_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles save_36109020.Click
If t1_36109020.Text.Length = 0 Then
MsgBox("fill the blank please")
Exit Sub
End If
If t2_36109020.Text.Length = 0 Then
MsgBox("fill the blank please")
Exit Sub
End If
If Val(t3_36109020.Text) = 0 Then
MsgBox("fill the blank please")
Exit Sub
End If
If Val(t4_36109020.Text) = 0 Then
MsgBox("fill the blank please")
Exit Sub
End If
If kb_36109020.Text <> t1_36109020.Text Then
dhedhe.AturPencarianDataBase("Barang", "KodeBarang", t1_36109020.Text, 1, ksr)
If dhedhe.JumlanBaris > 0 Then
MsgBox("Kode sudah ada")
Exit Sub
End If
End If
cmnd = New OleDb.OleDbCommand("update barang set kodebarang = '" & t1_36109020.Text & "', namabarang = '" & t2_36109020.Text & "', hargajual = " & Val(t3_36109020.Text) & ", jumlahbarang = " & Val(t4_36109020.Text) & " where kodebarang = '" & kb_36109020.Text & "'", ksr)
ksr.Open()
cmnd.ExecuteNonQuery()
ksr.Close()
cmnd.Dispose()
kb_36109020.Text = ""
t1_36109020.Text = ""
t2_36109020.Text = ""
t3_36109020.Text = ""
t4_36109020.Text = ""
End Sub
End Class
Latihan 28B
Public Class Form28B_36109020
Dim dhedhe As New ByIskandar.CariKeDataBaseByIskandar
Dim cmnd As New OleDb.OleDbCommand
Dim ksr As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE ='" & Application.StartupPath & "\Databarang.ACCDB'")
Private Sub save_36109020_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles save_36109020.Click
If t1_36109020.Text.Length = 0 Then
MsgBox("fill the blank please")
Exit Sub
End If
If t2_36109020.Text.Length = 0 Then
MsgBox("fill the blank please")
Exit Sub
End If
If Val(t3_36109020.Text) = 0 Then
MsgBox("fill the blank please")
Exit Sub
End If
If Val(t4_36109020.Text) = 0 Then
MsgBox("fill the blank please")
Exit Sub
End If
dhedhe.AturPencarianDataBase("Barang", "KodeBarang", t1_36109020.Text, 1, ksr)
If dhedhe.JumlanBaris > 0 Then
MsgBox("kode sudah ada")
Exit Sub
End If
cmnd = New OleDb.OleDbCommand("insert into barang (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & t1_36109020.Text & "','" & t2_36109020.Text & "'," & Val(t3_36109020.Text) & "," & Val(t4_36109020.Text) & ")", ksr)
ksr.Open()
cmnd.ExecuteNonQuery()
ksr.Close()
cmnd.Dispose()
t1_36109020.Text = ""
t2_36109020.Text = ""
t3_36109020.Text = ""
t4_36109020.Text = ""
End Sub
End Class
Dim dhedhe As New ByIskandar.CariKeDataBaseByIskandar
Dim cmnd As New OleDb.OleDbCommand
Dim ksr As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE ='" & Application.StartupPath & "\Databarang.ACCDB'")
Private Sub save_36109020_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles save_36109020.Click
If t1_36109020.Text.Length = 0 Then
MsgBox("fill the blank please")
Exit Sub
End If
If t2_36109020.Text.Length = 0 Then
MsgBox("fill the blank please")
Exit Sub
End If
If Val(t3_36109020.Text) = 0 Then
MsgBox("fill the blank please")
Exit Sub
End If
If Val(t4_36109020.Text) = 0 Then
MsgBox("fill the blank please")
Exit Sub
End If
dhedhe.AturPencarianDataBase("Barang", "KodeBarang", t1_36109020.Text, 1, ksr)
If dhedhe.JumlanBaris > 0 Then
MsgBox("kode sudah ada")
Exit Sub
End If
cmnd = New OleDb.OleDbCommand("insert into barang (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & t1_36109020.Text & "','" & t2_36109020.Text & "'," & Val(t3_36109020.Text) & "," & Val(t4_36109020.Text) & ")", ksr)
ksr.Open()
cmnd.ExecuteNonQuery()
ksr.Close()
cmnd.Dispose()
t1_36109020.Text = ""
t2_36109020.Text = ""
t3_36109020.Text = ""
t4_36109020.Text = ""
End Sub
End Class
Latihan 28A
Public Class Form28A_36109020
Dim dtb As New DataTable
Dim ksr As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.ACCDB")
Public Sub dhedhe()
Dim akbar As New OleDb.OleDbDataAdapter
akbar = New OleDb.OleDbDataAdapter("select * from barang", ksr)
dtb.Rows.Clear()
akbar.Fill(dtb)
akbar.Dispose()
End Sub
Private Sub Latihan_28A_022_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
dhedhe()
dgv_36109020.DataSource = dtb
End Sub
Private Sub input_36109020_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles input_36109020.Click
If Form28B_36109020.Visible = False Then
Form28B_36109020.Show()
Else
Form28B_36109020.Activate()
End If
End Sub
Private Sub tutup_36109020_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tutup_36109020.Click
Close()
End Sub
End Class
Dim dtb As New DataTable
Dim ksr As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.ACCDB")
Public Sub dhedhe()
Dim akbar As New OleDb.OleDbDataAdapter
akbar = New OleDb.OleDbDataAdapter("select * from barang", ksr)
dtb.Rows.Clear()
akbar.Fill(dtb)
akbar.Dispose()
End Sub
Private Sub Latihan_28A_022_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
dhedhe()
dgv_36109020.DataSource = dtb
End Sub
Private Sub input_36109020_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles input_36109020.Click
If Form28B_36109020.Visible = False Then
Form28B_36109020.Show()
Else
Form28B_36109020.Activate()
End If
End Sub
Private Sub tutup_36109020_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tutup_36109020.Click
Close()
End Sub
End Class
Selasa, 15 November 2011
latihan 27
Public Class Form27_36109020
Dim dhedhe As New ByIskandar.CariKeDataBaseByIskandar
Dim cmnd As New OleDb.OleDbCommand
Dim ksr As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE ='" & Application.StartupPath & "\Databarang.ACCDB'")
Private Sub save_36109020_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles save_36109020.Click
If t1_36109020.Text.Length = 0 Then
MsgBox("fill the blank please")
Exit Sub
End If
If t2_36109020.Text.Length = 0 Then
MsgBox("fill the blank please")
Exit Sub
End If
If Val(t3_36109020.Text) = 0 Then
MsgBox("fill the blank please")
Exit Sub
End If
If Val(t4_36109020.Text) = 0 Then
MsgBox("fill the blank please")
Exit Sub
End If
dhedhe.AturPencarianDataBase("Barang", "KodeBarang", t1_36109020.Text, 1, ksr)
If dhedhe.JumlanBaris > 0 Then
MsgBox("kode sudah ada")
Exit Sub
End If
cmnd = New OleDb.OleDbCommand("insert into barang (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & t1_36109020.Text & "','" & t2_36109020.Text & "'," & Val(t3_36109020.Text) & "," & Val(t4_36109020.Text) & ")", ksr)
ksr.Open()
cmnd.ExecuteNonQuery()
ksr.Close()
cmnd.Dispose()
t1_36109020.Text = ""
t2_36109020.Text = ""
t3_36109020.Text = ""
t4_36109020.Text = ""
End Sub
End Class
Dim dhedhe As New ByIskandar.CariKeDataBaseByIskandar
Dim cmnd As New OleDb.OleDbCommand
Dim ksr As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE ='" & Application.StartupPath & "\Databarang.ACCDB'")
Private Sub save_36109020_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles save_36109020.Click
If t1_36109020.Text.Length = 0 Then
MsgBox("fill the blank please")
Exit Sub
End If
If t2_36109020.Text.Length = 0 Then
MsgBox("fill the blank please")
Exit Sub
End If
If Val(t3_36109020.Text) = 0 Then
MsgBox("fill the blank please")
Exit Sub
End If
If Val(t4_36109020.Text) = 0 Then
MsgBox("fill the blank please")
Exit Sub
End If
dhedhe.AturPencarianDataBase("Barang", "KodeBarang", t1_36109020.Text, 1, ksr)
If dhedhe.JumlanBaris > 0 Then
MsgBox("kode sudah ada")
Exit Sub
End If
cmnd = New OleDb.OleDbCommand("insert into barang (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & t1_36109020.Text & "','" & t2_36109020.Text & "'," & Val(t3_36109020.Text) & "," & Val(t4_36109020.Text) & ")", ksr)
ksr.Open()
cmnd.ExecuteNonQuery()
ksr.Close()
cmnd.Dispose()
t1_36109020.Text = ""
t2_36109020.Text = ""
t3_36109020.Text = ""
t4_36109020.Text = ""
End Sub
End Class
Senin, 14 November 2011
sekarang,,,duduk di ujung sebuah ruangan yang tidak terlalu luas, tapi cukup menampung semua yang ingin aku keluarkan dari isi kepalaku...
aku mulai berpikir tentang sesuatu yang akan aku jalani ke depannya tanpa peduli dengan hal lain disekitarku..
lalu...
aku keluar ruangan, tak ada inspirasi di dalam tapi yang ada hanya segumpal pemikiran yang tak bisa ku keluarkan dalam bentuk apapun..
di sisi jalan sana, aku melihat sosok lelaki tua,,,
tapi tak begitu tua..
maksudku,,,mungkin umurnya sekitar setengah abad, tapi fisiknya seperti telah 70 tahun hidup dengan kondisi seperti itu...
lalu...
ku lihat ia mengais tumpukan sampah berbau begitu busuk, tapi tetap juga ia bergelut dengan hal seperti itu....
aku yakin, tak pernah ia memilih untuk menjadi apa yang seperti sekarang ia jalani.
kemudian, aku masuk kembali ke dalam rumah,
berbaring setelah mengamati hal yang terjadi di luar.
lalu, kupejamkan mata, dan tidur.
aku mulai berpikir tentang sesuatu yang akan aku jalani ke depannya tanpa peduli dengan hal lain disekitarku..
lalu...
aku keluar ruangan, tak ada inspirasi di dalam tapi yang ada hanya segumpal pemikiran yang tak bisa ku keluarkan dalam bentuk apapun..
di sisi jalan sana, aku melihat sosok lelaki tua,,,
tapi tak begitu tua..
maksudku,,,mungkin umurnya sekitar setengah abad, tapi fisiknya seperti telah 70 tahun hidup dengan kondisi seperti itu...
lalu...
ku lihat ia mengais tumpukan sampah berbau begitu busuk, tapi tetap juga ia bergelut dengan hal seperti itu....
aku yakin, tak pernah ia memilih untuk menjadi apa yang seperti sekarang ia jalani.
kemudian, aku masuk kembali ke dalam rumah,
berbaring setelah mengamati hal yang terjadi di luar.
lalu, kupejamkan mata, dan tidur.
Kamis, 10 November 2011
well,,,
i'll begin this moment, start from say "bismillahirrahmanirrahim"
i start look at my paper,,a paper,,,
mmm,,,a blank paper.
i take my pen, i hope that i can write something...
i sit in the corner of my room, and i look at a picture of nature
i hope i get an inspiration from that picture..
but in the fact???
NOTHING...
all just in my mind,,i can't say and write anything...
i'll begin this moment, start from say "bismillahirrahmanirrahim"
i start look at my paper,,a paper,,,
mmm,,,a blank paper.
i take my pen, i hope that i can write something...
i sit in the corner of my room, and i look at a picture of nature
i hope i get an inspiration from that picture..
but in the fact???
NOTHING...
all just in my mind,,i can't say and write anything...
I don't think that I knew the chaos I was getting in.
But I've broken all my promises to you
I've broken all my promises to you.
Why do you do this to me?
Why do you do this so easily?
You make it hard to smile because
You make it hard to breathe
Why do you do this to me?
A phrasing that's a single tear,
Is harder than I ever feared
And you were left feeling so alone.
Because these days aren't easy
Like they have been once before
These days aren't easy anymore.
Why do you do this to me?
Why do you do this so easily?
You make it hard to smile because
You make it hard to breathe
Why do you do this to me?
To me, to me, to me.
I should have known this wasn't real
And fought it off and fought to feel
What matters most? Everything
That you feel while listening to every word that I sing.
I promise you I will bring you home
I will bring you home.
But I've broken all my promises to you
I've broken all my promises to you.
Why do you do this to me?
Why do you do this so easily?
You make it hard to smile because
You make it hard to breathe
Why do you do this to me?
A phrasing that's a single tear,
Is harder than I ever feared
And you were left feeling so alone.
Because these days aren't easy
Like they have been once before
These days aren't easy anymore.
Why do you do this to me?
Why do you do this so easily?
You make it hard to smile because
You make it hard to breathe
Why do you do this to me?
To me, to me, to me.
I should have known this wasn't real
And fought it off and fought to feel
What matters most? Everything
That you feel while listening to every word that I sing.
I promise you I will bring you home
I will bring you home.
Langganan:
Postingan (Atom)