private static void UpdateTimesheetEntry(TimesheetEntryModel timesheetEntry) { List <TimesheetEntryModel> entry = new List <TimesheetEntryModel>(); entry.Add(timesheetEntry); UpdateTimesheetEntries(entry); }
public static void UpdateSelectedTimesheetEntry(TimesheetEntryModel selectedEntry) { teSelectedTimesheetEntry = selectedEntry; // Invoke Event so all views can be updated if (SelectedTimesheetEntryChanged != null) { SelectedTimesheetEntryChanged.Invoke(); } }
public static void ClockIn() { // Check if there are any unfinished shifts var entries = ocTimesheetEntires.FirstOrDefault(x => x.ClockOut == null); // If there aren't any, add a new shift if (entries == null) { TimesheetEntryModel shift = new TimesheetEntryModel(); shift.ClockIn = DateTime.Now; InsertTimesheetEntry(shift); } }