The focus of this lab was to implement web forms for the Pine Valley Furniture Company application that connect to the database at the backend. The objective was to connect ASP.NET Web Forms to a SQL Server database by building upon web forms developed in Lab 04. This lab includes new customer registration, customer data updates, product catalog management, and product selection with order placement pages, connected to the database.
Customer Registration Page (Register.aspx): Allows new customers to fill in their details and insert a record into the CUSTOMER_t table using a SQL INSERT query.
Update Customer Page (update_customer.aspx): Allows admin to search by Customer ID, retrieve their existing data, and update it in the database using a SQL UPDATE query.
Update Catalog Page (update_catalog.aspx): Allows employees to search for a product by description and update its details in the PRODUCT_t table.
Search & Order Page (search.aspx): Users can search furniture products by keyword and results are displayed in a product grid using a Repeater control. Items are added to cart with a specified quantity.
Cart Page (Cart.aspx): Displays all items in the current order by joining ORDER_t, Order_line_t, and PRODUCT_t tables, with options to proceed to payment or continue shopping.
All pages connect to a SQL server database using a connection string stored in Web.config. SqlConnection, SqlCommand, and SqlDataReader classes from System.Data.SqlClient were used for database interaction.
The registration and update handlers use SQL INSERT and UPDATE statements to write data to the database.