public FormMain() { InitializeComponent(); ThisDay = new Shifts.Day(DateTime.Today); CurrentShift = NewShift(); SetUpDataGridBinding(); UpdateLabels(); }
Shift NewShift() { if (CurrentShift == null) { CurrentShift = ThisDay.Days; } else if (CurrentShift.ThisShift == Shift.DayOrNight.Nights) { ThisDay = new Shifts.Day(ThisDay.Date.AddDays(1)); CurrentShift = ThisDay.Days; } else { CurrentShift = ThisDay.Nights; } return(CurrentShift); }