UAS Program Visual


Tampilan Awal Setelah di Runing 





Di situ terdapat 2 eksekusi ada Save dan Save & Exit 
Jika di Save berti data telah masuk ke database MS Access dan jendala masaih dalam keadan terbuka jika ingin isi kembali hars di clear dulu, Jika Save adn Exit program akan langsung ke luar.




Data yang di input di simpan di databasenya :)





Di atas penjelesan mengenai program yang saya buat yaitu Program Inventory buat saya dan team saya bekerja di tempat kerja saya sekalian mengimplentasikan yang sudah di pelajari :)

Berikut source kode program dan databasenya dari program yang sederhana :)


Imports System.Data
Imports System.Data.OleDb
Public Class Form1

    Dim Koneksi As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=E:\vbnet\inventoryna.accdb"
    Dim objekKoneksi As New OleDb.OleDbConnection(Koneksi)
    Dim xReader As OleDbDataReader

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

    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Textjb.Text = ""
        Textjmb.Text = ""
        Textkb.Text = ""
        Textnb.Text = ""





    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Dim sql1 As String = "INSERT INTO TBinventory VALUES ('" & Textkb.Text & "','" & Textnb.Text & "','" & Textjb.Text & "','" & Textjmb.Text & "','" & ComboBox1.SelectedItem & "')"
        Dim oCmd = New OleDbCommand(sql1, objekKoneksi)
        objekKoneksi.Open()

        oCmd.ExecuteNonQuery()
        objekKoneksi.Close()
        objekKoneksi.Close()
        Me.Close()
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim sql1 As String = "INSERT INTO TBinventory VALUES ('" & Textkb.Text & "','" & Textnb.Text & "','" & Textjb.Text & "','" & Textjmb.Text & "','" & ComboBox1.SelectedItem & "')"
        Dim oCmd = New OleDbCommand(sql1, objekKoneksi)
        objekKoneksi.Open()

        oCmd.ExecuteNonQuery()
        objekKoneksi.Close()
        objekKoneksi.Close()

    End Sub

    Private Function sql1() As Object
        Throw New NotImplementedException
    End Function

    Private Sub Textkb_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Textkb.TextChanged

    End Sub
End Class



 




Demikian UAS dan program yang saya buat terimakasih :)




0 Response to "UAS Program Visual "

Post a Comment

wdcfawqafwef