Esempio n. 1
0
        private bool isStatusChangeAllowed(TicketExchangeItem item)
        {
            //Sold Items cannot be modified.
            if ((GlobalConstants.TicketExchangeItemStatus)item.OriginalStatus == GlobalConstants.TicketExchangeItemStatus.Sold)
            {
                return(false);
            }

            //If the item is currently in another basket it cannot be modified.
            if (!(item.ErrorCode == null) && !(item.ErrorCode.Trim() == string.Empty) && item.ErrorCode.Trim() == TicketExchangeInfoItemInABasket)
            {
                return(false);
            }

            //On Sale Items can always be modified
            if ((GlobalConstants.TicketExchangeItemStatus)item.OriginalStatus == GlobalConstants.TicketExchangeItemStatus.OnSale)
            {
                return(true);
            }

            // Items which are in areas which are no longer available for ticket exchange cannot be modified.
            // The exception is if the item is already on sale. The Customer can choose to bring the item back.
            if (!(item.ErrorCode == null) && !(item.ErrorCode.Trim() == string.Empty))
            {
                return(false);
            }

            return(true);
        }
Esempio n. 2
0
        private bool isPriceChangeAllowed(TicketExchangeItem item)
        {
            // Sold Items cannot be modified.
            if ((GlobalConstants.TicketExchangeItemStatus)item.OriginalStatus == GlobalConstants.TicketExchangeItemStatus.Sold)
            {
                return(false);
            }

            // Items which are in areas which are no longer available for ticket exchange cannot be modified.
            if (!(item.ErrorCode == null) && !(item.ErrorCode.Trim() == string.Empty))
            {
                return(false);
            }

            // Extra Check for items currently on ticket Exchange
            if ((GlobalConstants.TicketExchangeItemStatus)item.OriginalStatus == GlobalConstants.TicketExchangeItemStatus.OnSale)
            {
                // On Sale Items which have a price which is no longer in the valid boundaries cannot be modified.
                if (item.RequestedPrice < item.MinPrice || item.RequestedPrice > item.MaxPrice)
                {
                    return(false);
                }

                // On Sale Items which have a calculated fee different to the product defaults  cannot be modified.
                if ((item.ProductClubHandlingFeeType == FixedType && item.Fee != item.ProductClubHandlingFee) ||
                    (item.ProductClubHandlingFeeType == PercentageType && Math.Abs(item.Fee - (item.ProductClubHandlingFee * item.RequestedPrice) / 100) > penny))
                {
                    return(false);
                }
            }
            return(true);
        }
Esempio n. 3
0
        private string setAdditionalInfo(TicketExchangeItem item)
        {
            String additionalInfo = string.Empty;


            // Sold items cannot be modified.
            if ((GlobalConstants.TicketExchangeItemStatus)item.OriginalStatus == GlobalConstants.TicketExchangeItemStatus.Sold)
            {
                additionalInfo = GetPageText("TicketExchangeItemInfo" + TicketExchangeInfoSold);
                return(additionalInfo);
            }

            // Items which are in areas which are no longer available for ticket exchange cannot be modified.
            // The exception is if the item is already on sale. The Customer can choose to bring the item back.
            if (!(item.ErrorCode == null) && !(item.ErrorCode.Trim() == string.Empty))
            {
                additionalInfo = GetPageText("TicketExchangeItemInfo" + item.ErrorCode.Trim());
                if (item.ErrorCode.Trim() == TicketExchangeInfoItemInABasket)
                {
                    return(additionalInfo);
                }

                if ((GlobalConstants.TicketExchangeItemStatus)item.OriginalStatus == GlobalConstants.TicketExchangeItemStatus.OnSale)
                {
                    additionalInfo = GetPageText("TicketExchangeItemInfo" + TicketExchangeInfoCodeAreaNowNotAvailable);
                    return(additionalInfo);
                }
            }

            // Extra Checks for items curently on sale
            if ((GlobalConstants.TicketExchangeItemStatus)item.OriginalStatus == GlobalConstants.TicketExchangeItemStatus.OnSale)
            {
                // On Sale Items which have a price which is no longer in the valid boundaries cannot be modified.
                if (item.RequestedPrice < item.MinPrice || item.RequestedPrice > item.MaxPrice)
                {
                    additionalInfo = GetPageText("TicketExchangeItemInfo" + TicketExchangeInfoCodeBoundaryChange);
                }

                // On Sale Items which have a calculated fee different to the product defaults  cannot be modified.
                if ((item.ProductClubHandlingFeeType == FixedType && item.Fee != item.ProductClubHandlingFee) ||
                    (item.ProductClubHandlingFeeType == PercentageType && Math.Abs(item.Fee - (item.ProductClubHandlingFee * item.RequestedPrice) / 100) > penny))
                {
                    additionalInfo = GetPageText("TicketExchangeItemInfo" + TicketExchangeInfoFeeDefaultsChange);
                }
            }

            return(additionalInfo);
        }