Esempio n. 1
0
        private void SetCurrentPto()
        {
            var calc = new TimeCalculator();

            this.Entries = calc.GetWeekPto(this.dtpSelectedDate.Value);
            UpdateControls();
        }
Esempio n. 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);
        }
Esempio n. 3
0
 public static void BulkUpsertPto(PtoWeekEntrys entries)
 {
     using (var data = new Data())
     {
         foreach (var entry in entries)
         {
             _UpsertPto(data, entry);
         }
     }
 }
Esempio n. 4
0
 public PtoWeekEnumerator(PtoWeekEntrys inner)
 {
     this.Inner = inner;
 }