Deskripsi Pemrograman
Program Toko Sepatu Online sederhana untuk memudahkan Kasir untuk memproses pembelian, menggunakan Visual Studio yang terhubung dengan Database
Screenshot Program
Keterangan Program
kasir cukup memilih pesanan pada field yang tersedia, lalu menekan tombol harga untuk mengetahui, jumlah pembelian, setelah itu proses, jika menggunakan discount tinggal klik diskon untuk mengetahui harga setelah barang di discount dan berapa jumlah uang di discountnya
Source Code
Imports System.Data
Imports System.Data.OleDb
Partial Class _Default
Inherits System.Web.UI.Page
Dim Koneksi As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\URDAL\Downloads\Eresha\UAS Pemrograman\UAS.accdb"
Dim objekKoneksi As New OleDb.OleDbConnection(Koneksi)
Dim xReader As OleDb.OleDbDataAdapter
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
End Sub
Protected Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
If DropDownList1.Text = ("Cardinal") Then
TextBox1.Text = ("300000")
ElseIf DropDownList1.Text = ("Precise") Then
TextBox1.Text = ("400000")
ElseIf DropDownList1.Text = ("Tomkins") Then
TextBox1.Text = ("150000")
ElseIf DropDownList1.Text = ("New Balance") Then
TextBox1.Text = ("750000")
ElseIf DropDownList1.Text = ("Addidas") Then
TextBox1.Text = ("600000")
ElseIf DropDownList1.Text = ("Diadora") Then
TextBox1.Text = ("200000")
End If
End Sub
Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim Harga, Jumlah, Total As Integer
Harga = Val(TextBox1.Text)
Jumlah = Val(DropDownList2.Text)
Total = Val(TextBox2.Text)
Total = Harga * Jumlah
TextBox2.Text = Total
End Sub
Protected Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
If TextBox2.Text Then
TextBox3.Text = TextBox2.Text * 10 / 100
TextBox4.Text = TextBox2.Text - TextBox3.Text
End If
End Sub
Protected Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Save()
End Sub
Sub Save()
objekKoneksi.Open()
Dim Tambah As String = "INSERT INTO TokoSepatuOnline values('" & DropDownList1.Text & "','" & TextBox1.Text &
"','" & DropDownList2.Text & "','" & TextBox2.Text & "','" & TextBox3.Text & "','" & TextBox4.Text & "')"
Dim oCmd = New OleDbCommand(Tambah, objekKoneksi)
oCmd.ExecuteNonQuery()
objekKoneksi.Close()
MsgBox("Sukses")
End Sub
Protected Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
Response.Redirect("View.aspx")
End Sub
End Class
Source Code
Imports System.Data
Imports System.Data.OleDb
Partial Class _Default
Inherits System.Web.UI.Page
Dim Koneksi As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\URDAL\Downloads\Eresha\UAS Pemrograman\UAS.accdb"
Dim objekKoneksi As New OleDb.OleDbConnection(Koneksi)
Dim xReader As OleDb.OleDbDataAdapter
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
End Sub
Protected Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
If DropDownList1.Text = ("Cardinal") Then
TextBox1.Text = ("300000")
ElseIf DropDownList1.Text = ("Precise") Then
TextBox1.Text = ("400000")
ElseIf DropDownList1.Text = ("Tomkins") Then
TextBox1.Text = ("150000")
ElseIf DropDownList1.Text = ("New Balance") Then
TextBox1.Text = ("750000")
ElseIf DropDownList1.Text = ("Addidas") Then
TextBox1.Text = ("600000")
ElseIf DropDownList1.Text = ("Diadora") Then
TextBox1.Text = ("200000")
End If
End Sub
Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim Harga, Jumlah, Total As Integer
Harga = Val(TextBox1.Text)
Jumlah = Val(DropDownList2.Text)
Total = Val(TextBox2.Text)
Total = Harga * Jumlah
TextBox2.Text = Total
End Sub
Protected Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
If TextBox2.Text Then
TextBox3.Text = TextBox2.Text * 10 / 100
TextBox4.Text = TextBox2.Text - TextBox3.Text
End If
End Sub
Protected Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Save()
End Sub
Sub Save()
objekKoneksi.Open()
Dim Tambah As String = "INSERT INTO TokoSepatuOnline values('" & DropDownList1.Text & "','" & TextBox1.Text &
"','" & DropDownList2.Text & "','" & TextBox2.Text & "','" & TextBox3.Text & "','" & TextBox4.Text & "')"
Dim oCmd = New OleDbCommand(Tambah, objekKoneksi)
oCmd.ExecuteNonQuery()
objekKoneksi.Close()
MsgBox("Sukses")
End Sub
Protected Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
Response.Redirect("View.aspx")
End Sub
End Class



