Loading…
Project 06

notes from the workbench

Employee Payroll System

Completed

Desktop employee payroll & contactless webcam QR attendance system with OOP hierarchy in C# WinForms.

  • C#
  • WinForms
  • .NET 4.8
  • MySQL
  • AForge (Webcam)
  • ZXing (QR)
Employee Payroll System preview
Interface previewEmployee Payroll System
The brief

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
People & permissions

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
Under the surface

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_karyawan
  • nama
  • jabatan
  • gaji_pokok
  • jenis_karyawan
  • qr_code
DataAbsensi6 fields
  • id_absensi
  • kode_karyawan
  • tanggal
  • status
  • jam_masuk
  • jam_keluar
KomponenGaji5 fields
  • id_komponen
  • nama_komponen
  • jenis
  • nilai
  • tipe_nilai
Gaji7 fields
  • id_gaji
  • kode_karyawan
  • bulan_tahun
  • gaji_pokok
  • total_tunjangan
  • total_potongan
  • gaji_bersih
User4 fields
  • id_user
  • username
  • password
  • role
Try it locally

From repo to running.

  1. 01Clone the C# desktop repository

    git clone https://github.com/pratama1246/SistemPenggajianKaryawan.git
  2. 02Navigate into the project root directory

    cd SistemPenggajianKaryawan
  3. 03Create MySQL database 'penggajian'

    mysql -u root -p -e 'CREATE DATABASE penggajian;'
  4. 04Configure database connection parameters if different from root / empty password

    nano Koneksi.cs
  5. 05Open SistemPenggajianKaryawan.csproj in Visual Studio 2022 and press F5. DatabaseSeeder auto-creates tables and sample data

    Compile & Run (F5)

Back to top ↑
next from the workbenchTicketly MobileRead the case study