Yeah, Veny banyak hal yang harus kau benahi..
Forgive me GOD, i dont have responsibility, sometimes i ignore my study,servant n family..
i want turn back, to make me a blessing and shining.. to Glorify Your Name..
I Need You to help me..
PheTomb
Rabu, 25 Juli 2012
Kamis, 05 April 2012
Ini bukan hanya soal simpati terhadap Seseorang yang dianiaya, disesah, dicambuk dan dihina.. tapi sampai pada perenungan bahwa pada Salib kita melihat betapa besar Kasih Allah dan betapa buruknya dosa kita..
Thank You Jesus, Jesus, Jesus Thank You Jesus
It's only by Your Grace that i could Live Today
Forever i will Praise Your Name...
Thank You Jesus, Jesus, Jesus Thank You Jesus
It's only by Your Grace that i could Live Today
Forever i will Praise Your Name...
Kamis, 01 Desember 2011
Latihan 32 Apkom
Public Class Form32a_36109028
Dim dt As New DataTable
Dim veny As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.ACCDB")
Public Sub cv()
Dim aa As New OleDb.OleDbDataAdapter
aa = New OleDb.OleDbDataAdapter("select * from barang", veny)
dt.Rows.Clear()
aa.Fill(dt)
aa.Dispose()
End Sub
Private Sub Form32a_36109028_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
cv()
dgv.DataSource = dt
End Sub
Private Sub t_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles t.Click
If Form32b_36109028.Visible = False Then
Form32b_36109028.Show()
Else
Form32b_36109028.Activate()
End If
End Sub
Private Sub ede_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ede.Click
If Form32c_36109028.Visible = False Then
Form32c_36109028.Show()
Else
Form32c_36109028.Activate()
End If
Form32c_36109028.aa.Text = dgv.CurrentRow.Cells("kodebarang").Value
Form32c_36109028.bb.Text = dgv.CurrentRow.Cells("namabarang").Value
Form32c_36109028.cc.Text = dgv.CurrentRow.Cells("hargajual").Value
Form32c_36109028.dd.Text = dgv.CurrentRow.Cells("jumlahbarang").Value
Form32c_36109028.ff.Text = dgv.CurrentRow.Cells("kodebarang").Value
Form32c_36109028.Show()
End Sub
End Class
Public Class Form32b_36109028
Dim Tumim As New ByIskandar.CariKeDataBaseByIskandar
Dim veny As New OleDb.OleDbCommand
Dim vetom As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.ACCDB")
Private Sub Form32b_36109028_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If aa.Text.Length = 0 Then
MsgBox("Isi rong itu yang kosong")
Exit Sub
End If
If bb.Text.Length = 0 Then
MsgBox("Isi rong itu yang kosong")
Exit Sub
End If
If Val(cc.Text) = 0 Then
MsgBox("Isi rong itu yang kosong")
Exit Sub
End If
If Val(dd.Text) = 0 Then
MsgBox("Isi rong itu yang kosong")
Exit Sub
End If
Tumim.AturPencarianDataBase("Barang", "KodeBarang", aa.Text, 1, vetom)
If Tumim.JumlanBaris > 0 Then
MsgBox("Adami kode barang seperti itu")
Exit Sub
End If
veny = New OleDb.OleDbCommand("insert into barang (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & aa.Text & "','" & bb.Text & "'," & Val(cc.Text) & "," & Val(dd.Text) & ")", vetom)
vetom.Open()
veny.ExecuteNonQuery()
vetom.Close()
veny.Dispose()
aa.Text = ""
bb.Text = ""
cc.Text = ""
dd.Text = ""
Form32a_36109028.cv()
End Sub
End Class
Public Class Form32c_36109028
Dim Tumim As New ByIskandar.CariKeDataBaseByIskandar
Dim veny As New OleDb.OleDbCommand
Dim vetom As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.ACCDB")
Private Sub ee_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ee.Click
If aa.Text.Length = 0 Then
MsgBox("Isi rong itu yang kosong")
Exit Sub
End If
If bb.Text.Length = 0 Then
MsgBox("Isi rong itu yang kosong")
Exit Sub
End If
If Val(cc.Text) = 0 Then
MsgBox("Isi rong itu yang kosong")
Exit Sub
End If
If Val(dd.Text) = 0 Then
MsgBox("Isi rong itu yang kosong")
Exit Sub
End If
If aa.Text <> ff.Text Then
Tumim.AturPencarianDataBase("Barang", "KodeBarang", aa.Text, 1, vetom)
If Tumim.JumlanBaris > 0 Then
MsgBox("Adami kode barang seperti itu")
Exit Sub
End If
End If
veny = New OleDb.OleDbCommand("update barang set kodebarang = '" & aa.Text & "', namabarang = '" & bb.Text & "', hargajual = " & Val(cc.Text) & ", jumlahbarang = " & Val(dd.Text) & " where kodebarang = '" & ff.Text & "'", vetom)
vetom.Open()
veny.ExecuteNonQuery()
vetom.Close()
veny.Dispose()
aa.Text = ""
bb.Text = ""
cc.Text = ""
dd.Text = ""
ff.Text = ""
Form32a_36109028.cv()
End Sub
End Class
Langganan:
Postingan (Atom)