Пример #1
0
        private void SetCurrentPto()
        {
            var calc = new TimeCalculator();

            this.Entries = calc.GetWeekPto(this.dtpSelectedDate.Value);
            UpdateControls();
        }
Пример #2
0
        private PtoWeekEntrys PtoAggregator(PtoWeekEntrys acc, TimeEntry entry)
        {
            switch (entry.When.DayOfWeek)
            {
            case DayOfWeek.Monday:
                TimeOfDayHandler(acc.Monday, entry);
                break;

            case DayOfWeek.Tuesday:
                TimeOfDayHandler(acc.Tuesday, entry);
                break;

            case DayOfWeek.Wednesday:
                TimeOfDayHandler(acc.Wednesday, entry);
                break;

            case DayOfWeek.Thursday:
                TimeOfDayHandler(acc.Thursday, entry);
                break;

            case DayOfWeek.Friday:
                TimeOfDayHandler(acc.Friday, entry);
                break;

            case DayOfWeek.Saturday:
                TimeOfDayHandler(acc.Saturday, entry);
                break;

            case DayOfWeek.Sunday:
                TimeOfDayHandler(acc.Sunday, entry);
                break;
            }
            return(acc);
        }
Пример #3
0
 public static void BulkUpsertPto(PtoWeekEntrys entries)
 {
     using (var data = new Data())
     {
         foreach (var entry in entries)
         {
             _UpsertPto(data, entry);
         }
     }
 }
Пример #4
0
 public PtoWeekEnumerator(PtoWeekEntrys inner)
 {
     this.Inner = inner;
 }