/// <summary> /// Applies all Staff Preferences in the given month to the shifts within the Month /// </summary> /// <param name="p_Month"></param> public void ApplyPreferences( Month p_Month ) { // Iterate over all Shifts foreach (Shift _Shift in p_Month.GetShifts()) { // Iterate over all Preferenced Time Windows foreach (UserTimeSpanPreference _Pref in m_CurrentlyStoredPreferences) { // Check if both overlap and Add the Preference to the Shift if (_Shift.ContainsTimeSpan( _Pref.m_Start, _Pref.m_End )) { _Shift.possibleUsers.Add( new Shift.UserShift( _Pref.m_User, _Pref.m_Preference ) ); } } // TODO: Fill every other User with no Preferences with a Default Shift Preference } }