DISKRIPSI LATIHAN 32 A
Latihan_32A_36110030
A.
Object-object dalam Latihan_32A_36110030 :
1. Object Label
Terdapat satu
label (yang bertuliskan daftar barang).
2. Object
DataGridView
Terdapat
satu object datagridview yang digunakan untuk menampilkan daftar barang.
3. Object
Button
Terdapat dua
object button (Edit dan Tambah). Button edit digunakan untuk mengedit daftar
barang pada form BARANG di Ms Access yang muncul pada datagridview. Jika button
edit diklik, maka akan muncul form Latihan_32B_36110030. Pada form
inilah data barang yang telah dipilih pada datagridview akan diedit.
Button
tambah digunakan untuk menambah daftar barang baru ke dalam form BARANG di Ms
Access. Jika button tambah diklik, maka akan muncul form Latihan_32C_36110030. Pada form inilah
data barang baru diinput dan kemudian disimpan.
B.
Script Unique
Untuk
script, dapat dilihat secara menyeluruh pada Prosedur Penyelesaian Latihan_32A_36110030.
C.
Even
isiyhuya()
Latihan_32A_36110030_Load
EDIT_36110030_Click
TAMBAH_36110030_Click
PROSEDUR PENYELESAIAN LATIHAN 32 A
1.KLIK STAR KEMUDIAN PILIH MICROSOFT VISUAL STUDIO 2008
2.KEMUDIAN KLIK NEW PROJECT PADA FILE
3.KEMUDIAN
KLIK ADD UNTUK MENAMBAHKAN PROJECT
4. KEMUDIAN BUATLAH FORM SEPERTI DIBAWAH INI :
5.KEMUDIAN MASUKAN RUMUS :
Public Class Latihan_32A_36110030
Dim bridgeyhuya As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=E:\semester 5\Apkom 4\LATIHAN 27-34 SIMPAN EDIT DELETE DATA\databarang.accdb;jet oledb:database password=hma")
Dim tabelyhuya As New DataTable
Public Sub isiyhuya()
Dim truckyhuya As New OleDb.OleDbDataAdapter
truckyhuya = New OleDb.OleDbDataAdapter("Select * From BARANG", bridgeyhuya)
tabelyhuya.Rows.Clear()
truckyhuya.Fill(tabelyhuya)
truckyhuya.Dispose()
End Sub
Private Sub Latihan_32A_36110030_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
isiyhuya()
isi_36110030.DataSource = tabelyhuya
End Sub
Private Sub TAMBAH_36110030_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Tambah_36110030.Click
If LatihAN_32B_36110030.Visible = False Then
LatihAN_32B_36110030.Show()
Else
LatihAN_32B_36110030.Activate()
LatihAN_32B_36110030.WindowState = FormWindowState.Normal
End If
End Sub
Private Sub EDIT_36110030_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Edit_36110030.Click
If LatihAN_32C_36110030.Visible = False Then
LatihAN_32C_36110030.Show()
Else
LatihAN_32C_36110030.Activate()
LatihAN_32C_36110030.WindowState = FormWindowState.Normal
End If
LatihAN_32C_36110030.ToolStripStatusLabel2.Text = isi_36110030.CurrentRow.Cells("KODEBARANG").Value
LatihAN_32C_36110030.KBL_36110030.Text = isi_36110030.CurrentRow.Cells("KODEBARANG").Value
LatihAN_32C_36110030.Nama_36110030.Text = isi_36110030.CurrentRow.Cells("NAMABARANG").Value
LatihAN_32C_36110030.Harga_36110030.Text = isi_36110030.CurrentRow.Cells("HARGAJUAL").Value
LatihAN_32C_36110030.Jumlah_36110030.Text = isi_36110030.CurrentRow.Cells("JUMLAHBARANG").Value
End Sub
End Class
Dim bridgeyhuya As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=E:\semester 5\Apkom 4\LATIHAN 27-34 SIMPAN EDIT DELETE DATA\databarang.accdb;jet oledb:database password=hma")
Dim tabelyhuya As New DataTable
Public Sub isiyhuya()
Dim truckyhuya As New OleDb.OleDbDataAdapter
truckyhuya = New OleDb.OleDbDataAdapter("Select * From BARANG", bridgeyhuya)
tabelyhuya.Rows.Clear()
truckyhuya.Fill(tabelyhuya)
truckyhuya.Dispose()
End Sub
Private Sub Latihan_32A_36110030_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
isiyhuya()
isi_36110030.DataSource = tabelyhuya
End Sub
Private Sub TAMBAH_36110030_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Tambah_36110030.Click
If LatihAN_32B_36110030.Visible = False Then
LatihAN_32B_36110030.Show()
Else
LatihAN_32B_36110030.Activate()
LatihAN_32B_36110030.WindowState = FormWindowState.Normal
End If
End Sub
Private Sub EDIT_36110030_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Edit_36110030.Click
If LatihAN_32C_36110030.Visible = False Then
LatihAN_32C_36110030.Show()
Else
LatihAN_32C_36110030.Activate()
LatihAN_32C_36110030.WindowState = FormWindowState.Normal
End If
LatihAN_32C_36110030.ToolStripStatusLabel2.Text = isi_36110030.CurrentRow.Cells("KODEBARANG").Value
LatihAN_32C_36110030.KBL_36110030.Text = isi_36110030.CurrentRow.Cells("KODEBARANG").Value
LatihAN_32C_36110030.Nama_36110030.Text = isi_36110030.CurrentRow.Cells("NAMABARANG").Value
LatihAN_32C_36110030.Harga_36110030.Text = isi_36110030.CurrentRow.Cells("HARGAJUAL").Value
LatihAN_32C_36110030.Jumlah_36110030.Text = isi_36110030.CurrentRow.Cells("JUMLAHBARANG").Value
End Sub
End Class
6. KEMUDIAN
UJI PROGRAM
7. JIKA
SUDAH BERHASIL Save program anda
8. selesai
0 komentar:
Posting Komentar