Ejemplo n.º 1
0
        private IEnumerable <SelectListItem> GetPayCycles()
        {
            var thisCycle = decimal.Floor(DateRef.GetWorkDay(DateTime.Today));

            return(Enumerable.Range(0, 15).Select(x => new SelectListItem {
                Text = $"{DateRef.PeriodEndDate(thisCycle - x):MM/dd/yyyy}", Value = (thisCycle - x).ToString()
            }));
        }
Ejemplo n.º 2
0
        public override string ToString()
        {
            int cycle = (int)Decimal.Floor(WorkDay);

            if (cycle == 0)
            {
                return("- Select -");
            }
            else
            {
                return($"{ DateRef.PeriodEndDate(WorkDay):MM/dd/yyyy} {Hours:n2}");
            }
        }