Time Logging Application

Code: github.com/PhilippMarquardt/time-logging

A desktop time tracking system I built for a small company. Employees clock in and out and log which job they are working on, and the office gets daily and monthly working time reports, including an Excel export for payroll. It is written in C# with WPF, uses Entity Framework 6 on top of a shared SQL database, and the UI is in German because that is what the people using it speak.

The solution has two separate applications that talk to the same database.

Timecontrol: the terminal for employees

This app runs on a shared PC in the workshop. The start screen is a grid of employee cards, and each card shows the person's name and what they are currently booked on. The grid resizes itself to fit however many employees there are.

Tapping a card opens the task selection, where the employee can:

  • Einstempeln / Ausstempeln – clock in and clock out
  • Pause / Raucherpause – start a break or a smoke break
  • Betriebsarbeiten / Büroarbeiten – book general workshop or office work
  • Auftrag auswählen – pick a customer job from a list of all open jobs (customer, job number, description)

Every booking closes the employee's currently running entry and opens a new one with the current timestamp, so the database always holds one continuous timeline per person and day. A few rules keep the data clean: you can only clock in once per day, and you have to be clocked in before you can book anything else. Writes run on a background thread so the terminal stays responsive. Timers reload the open jobs every 30 seconds and pick up newly added employees without a restart.

AdminModule: the office side

The admin app is for whoever manages the workshop and does payroll. It has these views:

  • Dashboard – who is in today and what they are working on right now
  • Zeiten verwalten – edit time entries, fix wrong job bookings or add missing ones. Added entries are flagged as nachgetragen (entered afterwards) so they can be told apart from real terminal bookings
  • Aufträge verwalten – view, edit, complete and delete customer jobs, see every time entry booked on a job, and optionally show completed jobs
  • Monatsauswertung – a calendar view per employee and month. Each day shows the total working time, and clicking a day lists its bookings in detail
  • Verwaltung – add new employees and new jobs

Working time per day is the sum of all closed entries, minus breaks and clock-out entries. Break time is tracked separately.

Excel export

The monthly analysis can be exported to an Excel file with EPPlus. For each day of the month you get the employee, date, total working time, clock-in and clock-out time and total break time, plus the total working time for the month. The file goes to the desktop and opens straight away, so it can be handed to payroll.

Stack

  • C# / .NET Framework, WPF with MVVM-style view models
  • Entity Framework 6 (database-first, EDMX)
  • MaterialDesignThemes for the UI
  • EPPlus for the Excel reports