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() })); }
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}"); } }