TimePunch Application Server v1.0.410.0

Das current patch release contains the following bug fixes:

Correction of the API in order to create a leave or sick time entry.
The leave entry can now be longer than the current estimated work time, like it is implemented in the TimePunch Client itself. The leave and sick time are getting cut to the max. estimated worktime of the current workday without returning an error code. This simplifies the creation of an leave or sick day. In order to create a entry for a hole day, the API call should be created for the maximum length of the workday. Example:

Code Snippet
  1. // Create a new holiday that is longer than the workday
  2. var entryAuth = new TpTimeEntries.TpAuthentication()
  3. {
  4. Culture = "de-DE",
  5. TpUser = "user",
  6. TpHashedPwd = MD5Hash("pwd")
  7. };
  8. TpTimeEntries.TpFault entryFault;
  9. var entry = timeEntries.CreateNewTimeEntry(entryAuth, new DateTime(2014, 01, 10), out entryFault);
  10.  
  11. entry.LogonTime = new DateTime(2014, 01, 10, 0, 0, 0);
  12. entry.LogoffTime = new DateTime(2014, 01, 10, 23, 59, 59);
  13. entry.Usage = TimeEntryType.Leave;
  14.  
  15. timeEntries.ValidateAndSaveTimeEntry(entryAuth, entry, out entryFault);
  16. if (entryFault != null)
  17. Console.Error.WriteLine(entryFault.FaultType);
  18. else
  19. Console.WriteLine("ok");

Leave a Reply