A desktop retail application for selling mobile phones โ featuring product browsing, shopping cart, checkout, user authentication, and an admin dashboard backed by SQL Server.
Core technologies powering the application
Classic desktop UI framework
Target: net8.0-windows
Local .\SQLEXPRESS instance
ADO.NET data access
Product image rendering
Static Session holder class
How the pieces connect โ from UI forms to the database
Every source file and what it does
Application entry point. Launches the main form.
Application.Run(new Form1())Static session holder shared across forms.
Main UI โ product listing, search, sort, cart grid.
Email + password authentication.
New user registration with role 'Customer'.
Multi-step password recovery flow.
Single product detail view with specs.
Order placement โ COD or bKash online.
Admin dashboard for products & orders.
Confirmation screen after placing an order.
Auto-generated UI control definitions for each form.
Inferred ER diagram from SQL usage in code
Step-by-step journeys through the application
Every query extracted from source code, grouped by file
Issues identified during code review
Passwords are stored and compared as raw strings in the Users table. Use bcrypt/Argon2 with per-user salt.
Queries orderQ, cartQ, itemQ, stockQ, delQ are built via string concatenation. Replace with SqlParameter.
Discount parsing supports '%' suffix but other inputs (email format, phone length) aren't consistently validated.
The connection string is duplicated across files. Move to appsettings.json or ConfigurationManager.
Most code correctly uses using blocks for SqlConnection and SqlCommand.
Form1, LoginForm, RegisterForm, and AdminForm use parameters correctly โ only CheckoutForm needs fixing.