Are there any examples of Time and Attendance System, I would like to know how it works on the part where an employee logs in and the logs are being saved under his/her account when he/she views his/her logs. I am new in .NET programming using VB and I just don't know where to start. What I have now is a DB for Employees that has EmployeeID,Password, (info)etc. and already have a design for Employee Attendance LogIn that consists of, EmployeeID and Password as the primary input. Please help me, Thanks!

It's done by database. When the user logs in, or clocks in, you create a record in a database that you specify (lets name it timesheets). When a user logs out, you create a new record as well. Database setup for this consists of:

EmployeeID (ID of the employee)
ClockType (in or out [1 or 0 for space saving])
DateCreated (getdate() or current_timestamp)

When a user logs in, it will check two places, the employee table (where I suggest you have another column named "clockedin" where you can set it to yes, no, true, false, 1, 0, or any combination you wish), and the timesheets table. First check the employee table, get the value (lets say he is logged in), then check the latest record by that employee, to see if Clocktype is equal to ClockedIn, If they both say he is logged in and the last record inserted says what time he logged in, then when he clocks out, accept it and insert the new record and update the logged in database to tell it has been logged out.

Three Databases:
Employees
- EmployeeID
...
...

ClockedStatus
- EmployeeID
- ClockedIn (true false, 1 0, yes no)

TimeSheets
- EmployeeID
- ClockType (in out, true false, 1 0, yes no)
- DateCreated (current date and time record created)

Check that ClockedStatus and Timesheets match up for clocking in and clocking out. If there is a failure, I would suggest logging the data and letting them sign out. Then fix the data yourself.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.