UAS_Basis Data II - Struk Penjualan Kasir
UAS BASIS DATA II - Struk Penjualan Kasir
Assalamualaikum, WR WB.
Pada Kali ini saya ingin memposting Tugas UAS tentang Normalisasi " Struk Penjualan Kasir ", yang di Konfers ke web dengan menggunakan ASP.NET, kemudian di koneksikan ke SQL Server 2014.
Berikut Source Code Manipulasi Data.
Imports System.Data
Imports System.Data.SqlClient
Module Module_Koneksi
Public con As New SqlConnection
Public cmd As New SqlCommand
Dim database As String
Sub open_database()
database = "Data Source=DODDY\SQLEXPRESS;Initial Catalog=UAS_05TPLP001_Doddy;Integrated Security=True"
con = New SqlConnection(database)
If con.State = ConnectionState.Closed Then con.Open()
End Sub
End Module
Assalamualaikum, WR WB.
Pada Kali ini saya ingin memposting Tugas UAS tentang Normalisasi " Struk Penjualan Kasir ", yang di Konfers ke web dengan menggunakan ASP.NET, kemudian di koneksikan ke SQL Server 2014.
1. Berikut Gambar Struk yang akan Di Normalisasi.
2. Tampilan SQL Server
3. Pembuatan Tabel Di SQL Server
![]() |
| Tabel Unnormalized |
![]() |
| Tabel Normal 1NF |
![]() |
| Tabel Barang |
![]() |
| Tabel Karyawan |
![]() |
| Tabel Penjualan |
![]() |
| Tabel Struk |
![]() |
| Tampilan Form Website |
![]() |
| Tampilan Hasil Output Di Website |
Berikut Source Code Manipulasi Data.
Imports System.Data
Imports System.Data.SqlClient
Module Module_Koneksi
Public con As New SqlConnection
Public cmd As New SqlCommand
Dim database As String
Sub open_database()
database = "Data Source=DODDY\SQLEXPRESS;Initial Catalog=UAS_05TPLP001_Doddy;Integrated Security=True"
con = New SqlConnection(database)
If con.State = ConnectionState.Closed Then con.Open()
End Sub
End Module
--------------------------------------------------------------------------------------------------------------------------
Berikut Source Code Button Programnya.
Imports System.Data
Imports System.Data.SqlClient
Public Class _05TPLP001_Doddy
Inherits System.Web.UI.Page
Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
open_database()
Dim simpan As String = "INSERT INTO Form_Querry values ('" & TextBox1.Text & "','" & TextBox2.Text & "','" & TextBox3.Text & "','" & TextBox4.Text & "','" & TextBox5.Text & "','" & TextBox6.Text & "')"
cmd = New SqlCommand(simpan, con)
cmd.ExecuteNonQuery()
MsgBox("Simpan Data Berhasil")
End Sub
Protected Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Response.Redirect("Web_View.aspx")
End Sub
Protected Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
End Sub
Protected Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
open_database()
Dim delete As String = "DELETE FROM Form_Querry WHERE Nama_Barang = '" & TextBox1.Text & "'"
cmd = New SqlCommand(delete, con)
cmd.ExecuteNonQuery()
con.Close()
MsgBox("Data Terhapus")
End Sub
End Class
========================================================================












Komentar
Posting Komentar