Jim ChangSoftware Engineer · System Integration
Retail chain

Staff Attendance App for Outlet PCs

A C# rewrite of a retail chain's staff attendance program, built to run on outlet PCs as old as Windows XP, with a local SQLite database and optional sync to the head-office SQL Server.

The problem

Staff check in and out on a Windows PC at each outlet, and the program has to keep running on Windows XP. The previous VB.NET version needed SQL Server Express on every one of those PCs and kept its head-office login in the code. Its staff download deleted the local list first, so one failed download could leave nobody able to check in. Head-office reports read the attendance dates as stored text, which meant the format could not change.

What I built

  • A WinForms check-in screen. Staff pick their name, key in their password and press In or Out under the same rules as before, including a second shift on the same day. A check-in left open from an earlier day is flagged and doesn't block today.
  • Today and Records tabs with date and employee filters and CSV export, plus settings behind a manager password set on first start.
  • A single SQLite file replaces SQL Server Express on every PC. It is backed up automatically each day and the last 14 copies are kept.
  • Optional sync with the head-office SQL Server that downloads the outlet's staff and uploads attendance through the same tables and queries as the old program.
  • A setup program for Windows XP SP3 and newer. It carries the offline .NET 4 installer, because XP can no longer download it over HTTPS, and keeps the attendance data through upgrades and uninstalls.
  • A SQL login for the outlets that can read the outlet and staff lists and add attendance rows, and nothing else.

Technical highlights

  • The build uses the current .NET SDK while targeting .NET 4.0 Client Profile and subsystem 5.01, so the compiler rejects any API that XP lacks. The SQLite native library was checked to be an XP binary before its version was pinned.
  • Attendance uploads in a single transaction: every row arrives or none does, and rows are marked as uploaded only after the commit.
  • Staff downloads update people in place, matched by code or name, so someone who is checked in can still check out afterwards. An empty or failed download changes nothing.
  • Staff passwords are salted PBKDF2 hashes that still ignore case and trailing spaces, as the old SQL Server comparison did. The head-office password is encrypted with Windows DPAPI.
  • 48 xUnit tests cover the check-in rules, sync against a fake server, backups, CSV export and colour contrast, and drive the real screens off-screen at 800×600. An opt-in test against the live server checks the stored date text and rolls its insert back.

Need something built or connected?

Send me a few lines on what you need and when you need it by.