What I set out to build.
Employee Payroll System is a Windows Forms desktop application built in C# (.NET Framework 4.8) and MySQL. Developed as a practical project for the Object-Oriented Programming (OOP) Lab course at Politeknik Negeri Cilacap by a 4-person student team, it features a self-healing auto-seeder, inheritance-based employee modeling (Permanent, Contract, Daily), dynamic salary allowance/deduction rules, and a dedicated Kiosk Mode for webcam-based QR badge check-ins.
The problem
Manual monthly salary calculations and paper-based attendance tracking cause calculation errors, late attendance disputes, and delays in issuing employee pay slips.
The approach
A desktop C# WinForms solution utilizing ADO.NET and MySQL that automatically initializes its schema on launch, executes OOP-based salary calculations, and uses a standard computer webcam to scan employee QR badges in real-time.
What it does
- OOP Architecture: BaseKaryawan abstract model with concrete Permanent, Contract, and Daily employee subclasses
- Contactless Kiosk Mode: Real-time webcam QR attendance scanning using AForge.Video & ZXing.Net
- Automated DatabaseSeeder: Self-healing schema generation and sample data seeding on startup
- Dynamic Salary Engine: Configurable allowances and deductions with automated monthly payroll processing
- Dynamic Slip Printing: In-app salary slip generation and viewing for employees
- Role-Based Security: Dedicated views for Admin, HRD, Kiosk, and Employee with encrypted credentials
A closer look.

Who uses it?
Administrator
- Employee master data management (Permanent, Contract, Daily)
- User credentials and role administration
- Generate and download employee QR identity badges
HRD Staff
- Salary components editor (dynamic allowances and deductions)
- Shift schedule, working hours, and grace-period late penalty configs
- Monthly payroll calculation trigger and attendance recap reports
Kiosk Mode
- Dedicated full-screen webcam check-in console
- Live video feed decoding of employee QR badges
- Secure credential-protected dialog to exit kiosk mode
Employee (Karyawan)
- Personal dashboard showing attendance records and payroll status
- View individual daily check-in/out attendance logs
- View and export dynamic monthly salary slips
Data structure.
Normalized MySQL schema containing tables for employee master profiles (base class with concrete models), attendance logs, login accounts, and salary components.
Karyawan6 fields
kode_karyawannamajabatangaji_pokokjenis_karyawanqr_code
DataAbsensi6 fields
id_absensikode_karyawantanggalstatusjam_masukjam_keluar
KomponenGaji5 fields
id_komponennama_komponenjenisnilaitipe_nilai
Gaji7 fields
id_gajikode_karyawanbulan_tahungaji_pokoktotal_tunjangantotal_potongangaji_bersih
User4 fields
id_userusernamepasswordrole
From repo to running.
01Clone the C# desktop repository
git clone https://github.com/pratama1246/SistemPenggajianKaryawan.git02Navigate into the project root directory
cd SistemPenggajianKaryawan03Create MySQL database 'penggajian'
mysql -u root -p -e 'CREATE DATABASE penggajian;'04Configure database connection parameters if different from root / empty password
nano Koneksi.cs05Open SistemPenggajianKaryawan.csproj in Visual Studio 2022 and press F5. DatabaseSeeder auto-creates tables and sample data
Compile & Run (F5)