🏫 This project was developed as part of the Entity Framework & Visual C# course at ITI Alexandria.
An Inventory Management System built with Windows Forms and Entity Framework Core to manage warehouse operations including supply, withdrawal, and transfer of products. The system also supports product movement tracking, reporting functionalities, and monitoring warehouse stock levels with detailed reports.
Entity Relationship diagram generated from SQL Server.
-
✅ Add, update, and delete:
- Products
- Clients and Suppliers (inherited from
Person) - Warehouses
- Supply Permits
- Withdraw Permits
- Transfer Permits (transfer products between warehouses)
-
🔄 Track all product movements, including:
- Date
- Quantity
- Type
-
📦 Manage warehouse-specific inventory:
- Quantity
- Entry Date
- Production Date & Expiry Date
-
📊 Generate reports:
- Products by stock
- Product aging (days in warehouse)
- Total quantity by warehouse/product/date
-
📚 Entity-based structure with controller classes for each domain model
-
💾 Uses Entity Framework Core for database interaction
-
📋 User-friendly interface with dynamic control generation for permit entries
- Frontend: Windows Forms (.NET)
- Backend: C#, Entity Framework Core
- Database: SQL Server
- Design Pattern: Simple controller-based architecture
- UI Layer: Windows Forms with custom
UserControlsfor each view - Data Access Layer: EF Core with
DbContextusing code-first approach - Controllers: Business logic for each entity
- e.g.,
ProductController,WithdrawPermitController
- e.g.,
- Models: Represent database entities
- e.g.,
Product,Warehouse,ProductInWarehouse, etc.
- e.g.,
| Technology | Purpose |
|---|---|
| C# (.NET) | Main programming language |
| Windows Forms | User Interface |
| EF Core | ORM & database management |
| SQL Server | Backend database |
| Visual Studio | IDE |
- Supply Permit: Adds new stock to a warehouse.
- Withdraw Permit: Removes stock from warehouse and tracks client info.
- Transfer Permit: Moves stock between two warehouses.
Each permit is linked to detailed product entries with:
- Production/expiry dates
- Movement logs
-
Each permit automatically updates:
- Stock levels in
ProductInWarehouse - Movement records in
ProductMovement - Related records like
SupplyPermitProductandWithdrawPermitProductlink the permit to stock entries
- Stock levels in
-
All quantity changes affect
ProductInWarehouseand are reflected in theProductMovementtable. -
Transfer Permits automatically:
- Deduct from source warehouse
- Add to destination warehouse
-
Validation prevents over-withdrawing beyond available stock.
-
Nullable relationships are handled cautiously to avoid null reference issues.
InventoryManagementSystem/
│
├── Controllers/
│ └── ProductController.cs, SupplyPermitController.cs, ...
├── Models/
│ └── Product.cs, SupplyPermit.cs, ...
├── UserControllers/
│ └── UserControl1.cs - UserControl6.cs (forms for each operation)
├── Data/
│ └── ApplicationDbContext.cs
├── Forms/
│ └── MainForm.cs
└── README.md
-
Clone this repo:
git clone https://github.com/your-username/inventory-management-system.git
-
Open the solution in Visual Studio
-
Run these commands in the Package Manager Console:
Add-Migration InitialCreate Update-Database
-
Build and run the project
Note: Ensure SQL Server LocalDB or another instance is running and configured in
appsettings.jsonorDbContext.
- Add authentication for admin access
- Export reports to PDF/Excel
- Add unit tests for controllers
- Add dark mode UI theme
This project is licensed under the MIT License.
Feel free to use and adapt it for your own projects.
Feel free to reach out for feedback, improvements, or collaborations!
📧 Email: mohab.wafaie@gmail.com
Made with ❤️ by Mohab Wafaie as part of the ITI Alexandria Visual C# and Entity Frameword Course.
