A 4-tier desktop application built in C# (.NET WinForms + SQL Server) for managing a bookstore's orders, inventory, employees, and customers. Built solo as a third-semester academic project focused on client-side application design against a relational database.
Note: This was built as a learning project for a database-driven application development course. Database connection strings in
App.confighave been redacted — replaceYOUR_SERVER,YOUR_USERNAME, andYOUR_PASSWORDwith your own SQL Server instance details to run it locally.
The solution follows a 4-tier architecture, separating concerns across independent layers:
GUI/ → Presentation layer (WinForms — login, order management, book/author/publisher/category screens)
BLL/ → Business logic layer (domain rules for Employees, Job Positions, Status, Users)
DAL/ → Data access layer (raw ADO.NET queries, stored procedure calls)
Entity/ → Entity Framework (ORM) data models, generated from the SQL Server schema
VALIDATOR/ → Centralized input validation (regex-based)
- Role-based access control — different login roles (MIS Manager, Sales Manager, Inventory Controller, Order Clerk) see different application tabs based on their job position
- Database-backed authentication — login credentials are validated against real
EmployeesandUsersAccounttables, not hardcoded - Hybrid data access — uses both raw ADO.NET with parameterized queries (to prevent SQL injection) and Entity Framework (ORM) for different parts of the application
- Stored procedures — user and employee create/update/delete operations are handled via SQL Server stored procedures (
SP_SaveUser,SP_UpdateUser,SP_DeleteUser,SP_SaveEmployee,SP_UpdateEmployee,SP_DeleteEmployee) - Full CRUD across multiple business entities — Books, Authors, Publishers, Categories, Customers, Employees, and Orders
- Regex-based input validation centralized in a dedicated validator class
Database_Schema.sql contains the full SQL Server schema: table definitions, primary/foreign key constraints, and stored procedures for the BooksDB database. Key tables:
| Table | Purpose |
|---|---|
Books, Authors, AuthorsBooks |
Book catalog and author relationships |
Categories, Publishers |
Book classification and publisher info |
Customers |
Customer records |
Employees, JobPositions, Status |
Staff management and role assignment |
Orders, OrderDetails |
Order processing |
UsersAccount |
Login credentials linked to employees |
- C# / .NET Framework
- Windows Forms (WinForms)
- SQL Server (T-SQL)
- ADO.NET (
SqlConnection, parameterizedSqlCommand) - Entity Framework 6 (Database-First / ORM)
- Restore the database: run
Database_Schema.sqlagainst a SQL Server instance to create theBooksDBdatabase, tables, and stored procedures - Open
Final_Project.slnin Visual Studio - Update the connection strings in
Final_Project/App.configwith your SQL Server instance details - Build and run the solution
- Log in with one of the test accounts (see
ReadMe.txtfor sample credentials and roles)
Built solo by Riyaz Badhan as a third-semester academic project.