/// <summary>
 /// Create a new time entry
 /// </summary>
 /// <param name="timeEntry">The time entry to be created</param>
 /// <returns>The new time entry</returns>
 public TimeEntry Create(TimeEntry timeEntry)
 {
     return this.Post<TimeEntry>(ApiUrls.TimeEntries.Post, SerializationHelper.SerializeToJson(timeEntry));
 }
        private void UpdateTimeEntry(float hours, TimeEntry currentTimeEntry)
        {
            Dictionary<string, object> updatedTimeEntry = new Dictionary<string, object>();
            updatedTimeEntry.Add("hours", hours + currentTimeEntry.hours);
            updatedTimeEntry.Add("date", DateTime.Today);
            updatedTimeEntry.Add("taskId", SelectedTask.id);
            updatedTimeEntry.Add("type", SelectedTimeEntryType.name);
            updatedTimeEntry.Add("userId", currentUser.id);

            App.TimeEntries.Update(currentTimeEntry.id, updatedTimeEntry);
        }
 /// <summary>
 /// Update a time entry
 /// </summary>
 /// <param name="timeEntry">The time entry with the updated fields</param>
 /// <returns>The updated time entry</returns>
 public TimeEntry Update(TimeEntry timeEntry)
 {
     return this.Put<TimeEntry>(string.Format(ApiUrls.TimeEntries.Put, timeEntry.id), SerializationHelper.SerializeToJson(timeEntry));
 }
        private void CreateTimeEntry(float hours)
        {
            TimeEntry te = new TimeEntry
            {
                hours = hours,
                date = DateTime.Today,
                taskId = SelectedTask.id,
                type = SelectedTimeEntryType.name,
                userId = currentUser.id
            };

            App.TimeEntries.Create(te);
        }