コード例 #1
0
        private static void UpdateTimesheetEntry(TimesheetEntryModel timesheetEntry)
        {
            List <TimesheetEntryModel> entry = new List <TimesheetEntryModel>();

            entry.Add(timesheetEntry);

            UpdateTimesheetEntries(entry);
        }
コード例 #2
0
        public static void UpdateSelectedTimesheetEntry(TimesheetEntryModel selectedEntry)
        {
            teSelectedTimesheetEntry = selectedEntry;

            // Invoke Event so all views can be updated
            if (SelectedTimesheetEntryChanged != null)
            {
                SelectedTimesheetEntryChanged.Invoke();
            }
        }
コード例 #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);
            }
        }