UAS_Rekayasa Perngkat Lunak


Gambar.01




 Gambar.02






Gambar.03


 Gambar.04




Gambar.05






Gambar.06







  • DATA PENJUALAN


Imports System.Data
Imports System.Data.OleDb


Public Class Penjualan
    Inherits System.Web.UI.Page
    Dim koneksi As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\My Documents\Data Toko.mdb"
    Dim objekkoneksi As New OleDb.OleDbConnection(koneksi)
    Dim xReader As OleDb.OleDbDataReader

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
        Dim koneksi As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\My Documents\Data Toko.mdb"
        Dim objekKoneksi As New OleDbConnection(koneksi)
        objekKoneksi.Open()
        Dim tambah As String = "INSERT INTO Toko_Rinaldy values ('" & namabarang.Text & "','" & qtty.Text & "','" & harga.Text & "','" & ukuran.Text & "','" & merk.Text & "')"
        Dim objCmd = New OleDbCommand(tambah, objekKoneksi)
        objCmd.ExecuteNonQuery()
        objekKoneksi.Close()
        MsgBox("DATA BERHASIL DISIMPAN")

    End Sub

    Protected Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click
        Response.Redirect("Gudang.aspx")
    End Sub

    Protected Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click
        namabarang.Text = ""
        qtty.Text = ""
        harga.Text = ""
        ukuran.Text = ""
        merk.Text = ""


    End Sub
 

    Protected Sub caribarang_Click(sender As Object, e As EventArgs) Handles caribarang.Click
        If Not Len(caribarang.Text) = 0 Then
            objekkoneksi.Close()
            objekkoneksi.Open()

            Dim ocmd As New OleDb.OleDbCommand(" SELECT * FROM Toko_Rinaldy where Nama Barang ='" + caribarang.Text + "'", objekkoneksi)

            xReader = ocmd.ExecuteReader()
            If xReader.HasRows Then
                xReader.Read()
                namabarang.Text = xReader("Nama Barang")
                qtty.Text = xReader("Qtty")
                harga.Text = xReader("Harga")
                ukuran.Text = xReader("Ukuran")
                merk.Text = xReader("Merk")


            Else
                caribarang.Text = "Mobil tidak ada"

                Exit Sub
            End If
        End If
    End Sub

    Protected Sub datatabel_Click(sender As Object, e As EventArgs) Handles datatabel.Click
        Response.Redirect("tabelpenjualan.aspx")
    End Sub
End Class




  • DATA GUDANG



Public Class Gudang
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim koneksi As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\My Documents\Data Toko.mdb"
        Dim objekkoneksi As New OleDb.OleDbConnection(koneksi)
    End Sub

    Protected Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
        Response.Redirect("Penjualan.aspx")
    End Sub

    Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim koneksi As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\My Documents\Data Toko.mdb"
        Dim objekKoneksi As New OleDbConnection(koneksi)
        objekKoneksi.Open()
        Dim tambah As String = "INSERT INTO Data_Gudang values ('" & jenisbarang.Text & "','" & qttybarang.Text & "','" & noseri.Text & "')"
        Dim objCmd = New OleDbCommand(tambah, objekKoneksi)
        objCmd.ExecuteNonQuery()
        objekKoneksi.Close()
        MsgBox("DATA BERHASIL DISIMPAN")
    End Sub

    Protected Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        jenisbarang.Text = ""
        qttybarang.Text = ""
        noseri.Text = ""
    End Sub
End Class





Komentar

Postingan Populer