A desktop-based Smart Order Management System built with C# WinForms (.NET Framework 4.8) and Microsoft SQL Server for a Year 2 Semester 2 university project.
- Project Overview
- Features
- Technology Stack
- System Workflow
- Installation & Setup
- Database Setup
- Product Images Setup
- Generate Demo Data
- Database Connection
- UI Preview
- Contributors
- License
Smart Order Management System is a desktop-based Self-Service Ordering System developed using C# WinForms (.NET Framework 4.8) and Microsoft SQL Server.
The system is designed for coffee shops, cafés, beverage stores, and other businesses that want to simplify the ordering process while improving customer experience.
Unlike a traditional Point of Sale (POS) system where staff manually create every customer order, this system allows customers to browse products and place orders by themselves using a dedicated customer interface.
Each staff member logs into the system before starting work, allowing the system to record which employee is responsible for handling customer orders during that shift.
Customers are not required to create an account or log in. They simply enter their name and an optional phone number before placing an order.
Once an order is confirmed:
- The order is saved into SQL Server.
- A waiting number is generated automatically.
- A QR Code is generated.
- A PDF invoice is generated.
- Every connected staff dashboard immediately receives the order in real time.
This allows multiple computers to work together through the same SQL Server database, providing an efficient and modern ordering experience similar to self-order kiosks used in restaurants and cafés.
- 👨💼 Admin
- 👨🔧 Staff
Customers do not log into the system. Staff register customers and create orders on their behalf.
- Secure administrator login
- Dashboard overview
- Manage admin & staff accounts
- View customer records
- View order history
- View order report
- Revenue analytics
- Top/Least selling products analytics
- Export reports to PDF
- Export reports to Excel
- Secure staff login
- Open Customer Ordering Screen
- Monitor incoming customer orders
- Real-time order dashboard
- View waiting queue
- View recent order
- View order details
- Track payment status
- Complete customer orders
- Call waiting numbers
No login or registration required.
Customers can:
- Enter name
- Optional phone number
- Browse products
- Browse by category
- Add products to cart
- Modify cart quantity
- Review order summary
- Select payment method
- Confirm order
- Receive waiting number
- Generate QR Code
- Generate PDF invoice
- Self-ordering customer interface
- Real-time synchronization between multiple computers
- Automatic waiting number generation
- Automatic QR Code generation
- Automatic PDF invoice generation
- Instant order notification on staff dashboard
- SQL Server centralized database
| Technology | Main Purpose |
|---|---|
| C# | Primary programming language used to develop the application |
| .NET Framework (4.8) | Desktop application framework for building the graphical user interface |
| Microsoft SQL Server | Stores and manages application data |
| System.Data.SqlClient | Connects the application to SQL Server |
| ReaLTaiizor | Provides modern WinForms UI controls and styling |
| QRCoder | Generates QR codes for customer orders |
| iTextSharp (5.5.13.5) | Creates and exports invoice PDFs |
| EPPlus (4.5.3.3) | Exports reports to Microsoft Excel |
| Visual Studio 2022/2026 | IDE used for development and debugging |
| SQL Server Management Studio (SSMS) | Used to create, manage, and execute SQL scripts |
Store Opens
│
▼
Staff Login
│
▼
Staff Dashboard
│
▼
Click "Customer"
│
▼
Customer Ordering Screen
│
▼
Customer Enters Name
(Optional Phone Number)
│
▼
Browse Product Categories
│
▼
Select Products
│
▼
Add Items To Cart
│
▼
Review Order
│
▼
Select Payment Method
│
▼
Confirm Order
│
▼
────────────────────────────────────
Order Saved into SQL Server
────────────────────────────────────
│
├────────────► Staff Dashboard Updates Instantly
│
▼
Waiting Number Generated
│
▼
QR Code Generated
│
▼
Invoice PDF Generated
│
▼
Customer Waits
│
▼
Staff Prepare Order
│
▼
Staff Calls Waiting Number
│
▼
Customer Receives Order
│
▼
Order Completed
Follow the steps below to set up the Smart Order Management System on your local machine.
Open Git Bash or Command Prompt and clone the repository:
git clone https://github.com/Laykimhoung/smart-order-management-system.gitOr download the project as a ZIP file from GitHub and extract it.
Open the solution file (SmartOrderManagementSystem.sln) using Visual Studio 2022/2026.
When opening the project for the first time, Visual Studio may display missing package errors.
To restore all required packages:
Right-click the Solution in Solution Explorer, then select:
Restore NuGet Packages
Go to:
Tools
→ NuGet Package Manager
→ Manage NuGet Packages for Solution...
Restore or install any missing packages.
The project uses the following NuGet packages:
- ReaLTaiizor
- QRCoder
- EPPlus
- iTextSharp
- System.Data.SqlClient
Note: If any dependency is still missing after restoring, install it manually through the NuGet Package Manager before running the application.
Follow the instructions in the Database Setup section below.
Follow the instructions in the Database Connection section below.
After completing all setup steps, press:
F5
or click Start in Visual Studio.
The application should now connect to SQL Server and run successfully.
This project uses Microsoft SQL Server.
Before running the application, you must create the database using the provided SQL scripts.
Open SQL Server Management Studio (SSMS) and connect to your SQL Server instance.
The project already includes all required sql code inside the SQL folder.
SmartOrderManagementSystem
│
├── SQL
│ ├── 1-Create_Database.sql
│ ├── 2-Add_Users&Product_Images.sql
│ ├── 3-Insert_Customers.sql
│ ├── 4-Demo_1K_Data.sql
Execute the following SQL files ONE BY ONE in the exact order shown below.
| Order | SQL File | Description |
|---|---|---|
| 1 | 1-Create_Database.sql |
Creates the SmartOrderDB database, all tables, relationships, stored procedures, and required objects. |
| 2 | 2-Add_Users&Product_Images.sql |
Inserts the default administrator accounts and updates all product image paths. |
| 3 | 3-Insert_Customers.sql |
Inserts sample customer records into the database. |
| 4 | 4-Demo_1K_Data.sql |
Generates demo orders, invoices, payments, waiting numbers, and report data for testing. |
Important: Do not execute the SQL files in a different order, otherwise the database may not be created correctly.
Once all four scripts have been executed successfully, your database setup is complete.
The project already includes all required product images inside the Images folder.
SmartOrderManagementSystem
│
├── Images
│ ├── Coffee
│ ├── Milk Tea
│ ├── Smoothie
│ ├── Soda
│ └── ...
Before executing the SQL file below:
2-Add_Users&Product_Images.sql
you must update the image paths so they match the location of the project on your computer.
The SQL file contains the default image path:
D:\SmartOrderManagementSystem\Images\
If your project is stored somewhere else, replace this path with the correct location.
Default path:
D:\SmartOrderManagementSystem\Images\
Replace with:
C:\Projects\SmartOrderManagementSystem\Images\
or
E:\College Projects\SmartOrderManagementSystem\Images\
Instead of replacing every image path manually, you can use Find and Replace in SQL Server Management Studio.
Press:
Ctrl + H
Then:
Find what
D:\SmartOrderManagementSystem\Images\
Replace with
Your own project path\Images\
Click Replace All to update every image path instantly.
Important: Update the image paths before executing
2-Add_Users&Product_Images.sql. If you execute the script without changing the paths, product images will not appear correctly inside the application.
The file:
4-Demo_1K_Data.sql
allows you to generate realistic demo data for testing the application.
Before executing the script, you may customize the following variables:
DECLARE @StartDate DATETIME = '2025-09-01 07:30:00';
DECLARE @EndDate DATETIME = '2026-07-08 17:30:00';
DECLARE @TotalSeconds INT = DATEDIFF(SECOND, @StartDate, @EndDate);
DECLARE @Counter INT = 1;
/* Change this value to generate more or fewer sample orders */
DECLARE @MaxOrders INT = 10000;| Variable | Description |
|---|---|
| @StartDate | The earliest date used when generating demo orders. |
| @EndDate | The latest date used when generating demo orders. |
| @MaxOrders | Specifies how many sample orders will be generated. |
Generate 100 sample orders:
DECLARE @MaxOrders = 100;Generate 500 sample orders:
DECLARE @MaxOrders = 500;Create date time for sample orders:
DECLARE @StartDate DATETIME = '2025-01-01 08:00:00';
DECLARE @EndDate DATETIME = '2026-12-22 23:30:00';This script is useful for testing:
- Dashboard statistics
- Revenue reports
- Sales analytics
- Customer history
- Waiting numbers
- PDF invoices
- Export reports
without manually entering data.
After creating the database, you must configure the application's SQL Server connection.
Open the following file:
Database/
└── DatabaseConnection.cs
Locate the connection string:
@"Server=PROTECT-ME;
Database=SmartOrderDB;
User Id=sa;
Password=sa;
TrustServerCertificate=True;";Replace the following values with your own SQL Server configuration:
- Server Name
- SQL Username
- SQL Password
@"Server=localhost;
Database=SmartOrderDB;
Integrated Security=True;
TrustServerCertificate=True;";@"Server=DESKTOP-XXXX;
Database=SmartOrderDB;
User Id=sa;
Password=1234;
TrustServerCertificate=True;";Tip: Your server name may be
localhost,SQLEXPRESS, your computer name, or another SQL Server instance depending on your installation.
Save the file after updating the connection string.
The following screenshots demonstrate the user interfaces of the system.
Developed by:
Year 2 Semester 2 University Team Project
Members:
- Team Lead
- Admin Form
- Staff Form
- Customer Form
- Login Form
- Database
- Tester
This project is developed for educational purposes only as a Year 2 Semester 2 university project.