Exemplo n.º 1
0
        private static void UpdateTimesheetEntry(TimesheetEntryModel timesheetEntry)
        {
            List <TimesheetEntryModel> entry = new List <TimesheetEntryModel>();

            entry.Add(timesheetEntry);

            UpdateTimesheetEntries(entry);
        }
Exemplo n.º 2
0
        public static void UpdateSelectedTimesheetEntry(TimesheetEntryModel selectedEntry)
        {
            teSelectedTimesheetEntry = selectedEntry;

            // Invoke Event so all views can be updated
            if (SelectedTimesheetEntryChanged != null)
            {
                SelectedTimesheetEntryChanged.Invoke();
            }
        }
Exemplo n.º 3
0
        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);
            }
        }