예제 #1
0
        /// <summary>
        /// Determines whether [is temporarily closed] [the specified kiosk].
        /// </summary>
        /// <param name="kiosk">The kiosk.</param>
        /// <param name="configuredGroupTypeIds">The configured group type ids.</param>
        /// <param name="checkInState">State of the check in.</param>
        /// <returns>
        ///   <c>true</c> if [is temporarily closed] [the specified kiosk]; otherwise, <c>false</c>.
        /// </returns>
        private static bool IsTemporarilyClosed(KioskDevice kiosk, List <int> configuredGroupTypeIds, CheckInState checkInState)
        {
            bool isTemporarilyClosed = (!kiosk.HasLocations(configuredGroupTypeIds) && !checkInState.AllowCheckout) ||
                                       (checkInState.AllowCheckout && !kiosk.HasActiveCheckOutLocations(configuredGroupTypeIds));

            return(isTemporarilyClosed);
        }
예제 #2
0
        /// <summary>
        /// Determines whether the specified kiosk is closed.
        /// </summary>
        /// <param name="kiosk">The kiosk.</param>
        /// <param name="configuredGroupTypeIds">The configured group type ids.</param>
        /// <param name="checkInState">State of the check in.</param>
        /// <returns>
        ///   <c>true</c> if the specified kiosk is closed; otherwise, <c>false</c>.
        /// </returns>
        private static bool IsClosed(KioskDevice kiosk, List <int> configuredGroupTypeIds, CheckInState checkInState)
        {
            // Closed if there are no active locations and check-out is not allowed, or if check -out is allowed but there
            // are no active check-out locations.
            bool isClosed = (!kiosk.HasActiveLocations(configuredGroupTypeIds) && !checkInState.AllowCheckout) ||
                            (checkInState.AllowCheckout && !kiosk.HasActiveCheckOutLocations(configuredGroupTypeIds));

            return(isClosed);
        }