Code Implementation Report

← Back to Lab 05 Menu

Objective

The objective of Lab 05 was to build a complete, database-driven web application for Pine Valley Furniture Company (PVFC) using ASP.NET Web Forms and VB.NET connected to SQL Server. The system covers customer registration, product search with a session-based shopping cart, multi-item order placement, product catalog management, and a dedicated customer information update page — all implementing SQL INSERT, SELECT, and UPDATE commands.

Pages Implemented

Page Purpose Key SQL Operation
Registration.aspx New customer registration INSERT INTO CUSTOMER_t — stores new Customer ID in Session
Update.aspx Update existing customer info UPDATE CUSTOMER_t — Primary Key (Customer_Id) cannot be changed
Search.aspx Product search & shopping cart SELECT FROM PRODUCT_t — results added to Session cart with quantities
Order.aspx Checkout & order placement INSERT into ORDER_t then loop-insert into Order_line_t
Catalog.aspx Product catalog management INSERT (add) and UPDATE PRODUCT_t (edit by Product ID)
Help.aspx User guide Static — no DB interaction

Shopping Cart Algorithm

  1. Search: User types description or selects product line and clicks Search.
  2. Add to Cart: Each result row has a Quantity textbox and "Add to Cart" button. Clicking it stores the item into a DataTable kept in Session("Cart").
  3. Cart Display: Cart summary and Grand Total are shown live below search results.
  4. Proceed to Order: "Place Order" button navigates to Order.aspx with cart in Session.
  5. Order Placement:

Update Feature (Registration)

Update.aspx allows customers to correct their registration details after signing up. The Customer ID (Primary Key) is used to locate the record but is never modified. All other fields (Name, Address, City, State, Postal Code) can be updated using a parameterized UPDATE statement to prevent SQL injection.

Form Validation

All input forms use ASP.NET Validation Controls:

Tools & Technologies

Database Schema (Key Tables)

Table Primary Key Key Columns
CUSTOMER_t Customer_Id (IDENTITY) Name, Address, City, State, Postal Code
PRODUCT_t Product_Id (IDENTITY) Description, Finish, Standard_Price, Product_Line_Id
ORDER_t Order_Id (IDENTITY, starts 1001) Customer_Id (FK), Order_Date
Order_line_t Order_Id + Product_Id (composite) Ordered_Quantity
PRODUCT_LINE_t Product_Line_Id Product_Line_Name

© 2026 Pine Valley Furniture Company | Lab 05 | Mansoob-e-Zahra

Web hosting by Somee.com