Skip to content

About

Demo Prison Management

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

Β 

History

4 Commits

Folders and files

Repository files navigation

🏒 Prison Management System Project

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.


πŸ“‹ Overview

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.

Tech Stack

  • 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

πŸ—οΈ Project Structure

The project is organized into three main architectural layers:

πŸ”Ή Presentation Layer (PresentationLayer/)

The user interface where administrators, guards, doctors, and receptionists interact with the system.

User Roles & Modules:

  • 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

Authentication:

  • Multi-role login system
  • First-time signup wizard for initial admin setup
  • User credential change functionality

πŸ”Ή Business Layer (BusinessLayer/)

Contains the core business logic and domain models.

Entity Types (User Types):

  • Administrator.cs - Admin role management
  • Doctor.cs - Medical staff operations
  • Guard.cs - Security personnel functions
  • Reception.cs - Front desk operations
  • User.cs - Base user model

Domain Models (Prison Data):

  • Prisoner.cs - Prisoner information and lifecycle
  • Case.cs - Legal cases associated with prisoners
  • Visitor.cs - Visitor records and permissions
  • Visit.cs - Scheduled visits and logs
  • Treatment.cs - Medical treatment records
  • GuardInfo.cs - Guard details and assignments
  • DoctorInfo.cs - Doctor profiles and schedules
  • PrisonCell.cs - Cell availability and occupancy
  • PrisonBlock.cs - Building/sector organization
  • ReceptionInfo.cs - Check-in/check-out data

Reports:

  • TreatmentDataSet.Designer.cs
  • VisitDataSet.Designer.cs
  • PrisonerCaseDataSet.Designer.cs

πŸ”Ή Data Access Layer (DataAccessLayer/)

Handles all database interactions using ADO.NET.

Components:

  • UserDBLayer.cs - User authentication and management
  • PrisonDataDBLayer/ - Entity-specific data access classes:
    • PrisonerDBLayer.cs - CRUD operations for prisoners
    • CaseDBLayer.cs - Case file management
    • VisitorDBLayer.cs - Visitor records
    • VisitDBLayer.cs - Visit scheduling and tracking
    • TreatmentDBLayer.cs - Medical treatment logs
    • GuardInfoDBLayer.cs - Guard data access
    • DoctorInfoDBLayer.cs - Doctor information
    • PrisonCellDBLayer.cs - Cell management
    • PrisonBlockDBLayer.cs - Building structure
    • ReceptionInfoDBLayer.cs - Reception data

Database Operations:

  • Stored procedure calls (e.g., spAddPrisoner, spSearchPrisoner, spViewAllPrisoners)
  • Data set population and filtering
  • Error handling with user feedback via MessageBox

🎯 Key Features

βœ… Core Functionality

  • 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 & Filter Capabilities

  • Search prisoners by: First Name, Last Name, Phone Number, Email, ID
  • View all records with pagination support
  • Role-based data filtering

πŸ—„οΈ Database Schema (Inferred)

The system uses SQL Server with the following main tables:

  • Users - Authentication and role management
  • Prisoners - Personal information and housing
  • Cases - Legal case records
  • Visitors - Visitor database
  • Visits - Visit logs and scheduling
  • Treatments - Medical treatment history
  • Guards - Guard personnel
  • Doctors - Medical staff
  • Cells - Housing unit assignments
  • Blocks - Building/sector organization

πŸ“¦ Installation & Setup

Prerequisites

  • .NET Framework 4.7.2 or higher
  • Visual Studio 2019+ (for development)
  • SQL Server (local or remote)
  • SQL Server Management Studio (optional)

Configuration

  1. Clone the repository
  2. Open PrisonManagementSystemProjectv0.csproj in Visual Studio
  3. Configure connection string in App.config or code
  4. Restore NuGet packages if needed
  5. Build and run the solution

Database Setup

  • Run provided SQL scripts to create database schema
  • Execute stored procedures for initial data population

πŸ‘₯ User Roles & Permissions

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

🧩 Module Details

Administrator Dashboard

  • Overview of prison statistics
  • Quick access to all modules
  • Report generation hub

Prisoner Management

  • 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)

Visitor Management

  • Register new visitors
  • Search existing visitors
  • Schedule and track visits
  • Generate visitor visit reports

Employee Management

  • Add/update doctors and guards
  • Role-specific employee forms
  • View all employees by type

Reporting System

  • Prisoner case reports
  • Treatment reports
  • Visit reports
  • Custom report generation

🎨 UI/UX Features

  • 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.cs files for all UI forms
  • Consistent Theme - Professional blue-tinted interface

πŸ“ Development Notes

Architecture Patterns

  • 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

Error Handling

  • Try-catch blocks throughout data access code
  • User-friendly MessageBox error dialogs
  • Null-safe operations with fallback returns

Code Organization

  • Partial classes for database logic (public partial class DBLayer)
  • Separate namespaces for different layers
  • Strong naming and assembly configuration in .csproj

πŸ” Security Considerations

  • Role-based access control (RBAC)
  • Secure authentication with user credential management
  • SQL stored procedures to prevent injection attacks
  • Input validation on form submissions

πŸš€ Future Enhancements

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

πŸ“„ License

This is an educational project created for a Windows Programming course. Use as-is or modify for learning purposes.


πŸ‘¨β€πŸ’» Author

Esrom Tadesse (@Esrom29)
Windows Programming Course Term Project


πŸ“ž Contact & Support


Built with ❀️ for efficient prison administration automation.

About

Demo Prison Management

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages