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.
| 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 |
DataTable kept in Session("Cart").Order.aspx with cart in Session.
Session("CustomerID")INSERT one header row into ORDER_t → get auto-generated Order_Id via
SCOPE_IDENTITY()
INSERT each item into Order_line_tSession("Cart") on success
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.
All input forms use ASP.NET Validation Controls:
RequiredFieldValidator — ensures no blank fieldsRegularExpressionValidator — enforces 2-letter State codes (e.g., NY)CompareValidator — ensures Price and ID fields are numericSystem.Data.SqlClient with parameterized queriesSession object for cart and customer state| 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