A comprehensive Windows Forms application for managing prison operations, including prisoners, guards, doctors, visitors, cases, treatments, and prison infrastructure. Built as a Windows Programming course term project.
This is a full-featured desktop management system designed to streamline prison administration tasks. The application follows a classic 3-tier architecture with clear separation of concerns between data access, business logic, and user interface layers.
- Framework: .NET Framework / Windows Forms (C#)
- Database: Microsoft SQL Server
- Architecture: 3-Tier Architecture (Presentation Layer β Business Layer β Data Access Layer)
- UI Technology: WinForms with MDI interfaces
The project is organized into three main architectural layers:
The user interface where administrators, guards, doctors, and receptionists interact with the system.
-
Administrator - Full system access
- Admin Dashboard
- Visitor Management (View all, Search, Select)
- Prisoner Management (View all, Search, Reports)
- Employee Management (Doctors, Guards)
- Report Generation (Cases, Treatments, Visits)
-
Doctor - Medical module access
- Patient treatment records
- Doctor-specific reports
-
Guard - Security & housing management
- Cell assignments
- Guard information management
-
Reception - Entry point management
- New prisoner intake
- Visitor scheduling
- Initial data entry
- Multi-role login system
- First-time signup wizard for initial admin setup
- User credential change functionality
Contains the core business logic and domain models.
Administrator.cs- Admin role managementDoctor.cs- Medical staff operationsGuard.cs- Security personnel functionsReception.cs- Front desk operationsUser.cs- Base user model
Prisoner.cs- Prisoner information and lifecycleCase.cs- Legal cases associated with prisonersVisitor.cs- Visitor records and permissionsVisit.cs- Scheduled visits and logsTreatment.cs- Medical treatment recordsGuardInfo.cs- Guard details and assignmentsDoctorInfo.cs- Doctor profiles and schedulesPrisonCell.cs- Cell availability and occupancyPrisonBlock.cs- Building/sector organizationReceptionInfo.cs- Check-in/check-out data
TreatmentDataSet.Designer.csVisitDataSet.Designer.csPrisonerCaseDataSet.Designer.cs
Handles all database interactions using ADO.NET.
- UserDBLayer.cs - User authentication and management
- PrisonDataDBLayer/ - Entity-specific data access classes:
PrisonerDBLayer.cs- CRUD operations for prisonersCaseDBLayer.cs- Case file managementVisitorDBLayer.cs- Visitor recordsVisitDBLayer.cs- Visit scheduling and trackingTreatmentDBLayer.cs- Medical treatment logsGuardInfoDBLayer.cs- Guard data accessDoctorInfoDBLayer.cs- Doctor informationPrisonCellDBLayer.cs- Cell managementPrisonBlockDBLayer.cs- Building structureReceptionInfoDBLayer.cs- Reception data
- Stored procedure calls (e.g.,
spAddPrisoner,spSearchPrisoner,spViewAllPrisoners) - Data set population and filtering
- Error handling with user feedback via MessageBox
- Multi-Role Authentication - Secure login system for different user types
- Prisoner Lifecycle Management - Intake, tracking, case management, release
- Visitor Control System - Registration, approval, visit scheduling
- Medical Services Tracking - Doctor assignments, treatment records
- Cell Assignment & Housing - Dynamic cell allocation and block management
- Guard Personnel Management - Staff roster and duty assignments
- Case File System - Legal case documentation per prisoner
- Comprehensive Reporting - Generate reports on treatments, visits, cases
- Search prisoners by: First Name, Last Name, Phone Number, Email, ID
- View all records with pagination support
- Role-based data filtering
The system uses SQL Server with the following main tables:
Users- Authentication and role managementPrisoners- Personal information and housingCases- Legal case recordsVisitors- Visitor databaseVisits- Visit logs and schedulingTreatments- Medical treatment historyGuards- Guard personnelDoctors- Medical staffCells- Housing unit assignmentsBlocks- Building/sector organization
- .NET Framework 4.7.2 or higher
- Visual Studio 2019+ (for development)
- SQL Server (local or remote)
- SQL Server Management Studio (optional)
- Clone the repository
- Open
PrisonManagementSystemProjectv0.csprojin Visual Studio - Configure connection string in
App.configor code - Restore NuGet packages if needed
- Build and run the solution
- Run provided SQL scripts to create database schema
- Execute stored procedures for initial data population
| Role | Access Level | Primary Functions |
|---|---|---|
| Administrator | Full system access | Manage all users, prisoners, visitors, generate reports |
| Doctor | Medical module only | View prisoner medical info, record treatments |
| Guard | Security & housing | Manage cells, guard duties, prisoner movement |
| Reception | Intake & scheduling | New prisoner intake, visitor appointments |
- Overview of prison statistics
- Quick access to all modules
- Report generation hub
- View all prisoners with filtering
- Search by multiple criteria
- Add new prisoners with automatic ID generation
- Update prisoner information
- Manage prisoner cases
- Delete prisoners (with data integrity checks)
- Register new visitors
- Search existing visitors
- Schedule and track visits
- Generate visitor visit reports
- Add/update doctors and guards
- Role-specific employee forms
- View all employees by type
- Prisoner case reports
- Treatment reports
- Visit reports
- Custom report generation
- MDI (Multiple Document Interface) - Multiple windows within one application
- Icon Assets - Custom prison-themed icons in multiple sizes (16px, 32px, 48px, 64px)
- Form Designer Files -
.Designer.csfiles for all UI forms - Consistent Theme - Professional blue-tinted interface
- Separation of Concerns - Clear layer boundaries
- Data Access Object (DAO) - Database abstraction in DBLayer classes
- Model-View-Controller (MVC) Lite - Business entities separate from UI
- Try-catch blocks throughout data access code
- User-friendly MessageBox error dialogs
- Null-safe operations with fallback returns
- Partial classes for database logic (
public partial class DBLayer) - Separate namespaces for different layers
- Strong naming and assembly configuration in
.csproj
- Role-based access control (RBAC)
- Secure authentication with user credential management
- SQL stored procedures to prevent injection attacks
- Input validation on form submissions
Potential improvements for production deployment:
- Web-based interface (ASP.NET Core MVC or Blazor)
- RESTful API layer
- Mobile app for guards/doctors
- Advanced analytics dashboard
- SMS/Email notifications for visitors
- Audit logging system
- Automated backups
- Cloud database support
This is an educational project created for a Windows Programming course. Use as-is or modify for learning purposes.
Esrom Tadesse (@Esrom29)
Windows Programming Course Term Project
- GitHub: xXRex45Xx/PrisonManagementSystemProject
- Issues & PRs: Welcome! Feel free to contribute.
Built with β€οΈ for efficient prison administration automation.