Beispiel #1
0
        /// <summary>
        /// set the common card proeprties on both topup and card purchase scenairos in the session state
        /// </summary>
        protected void SetCommonPurchaseProperties()
        {
            SaveShoppingBasketIntoState();

            //if the cards number in SB equals to or larger than the maximum allowed cards on SB
            int newcards   = _NavigationState.SB_ShoppingBasket.SB_Cards.Where(x => x.IsNew).Sum(x => x.Quantity);
            int existcards = _NavigationState.SB_ShoppingBasket.SB_Cards.Count(x => !x.IsNew);
            int totcards   = newcards + existcards;

            if (totcards >= SBConfigValues.SBConfigList.MaxCardsPerSB)
            {
                string lURL = QueryStringManager.GetEncryptedPageURL("SB URL",
                                                                     QueryStringManager.enumQueryStringKeys.MaxCardsExceeded.ToString() + "=true");

                HttpContext.Current.Response.Redirect(lURL);
            }
            else if (new SND.BusinessManagers.Domain.ConfigurationManager().IsChildPersonalizedVerificationProcessEnabled() &&
                     _NavigationState.SB_ShoppingBasket.SB_Cards.Any(card => card.CardProfileCode == SWC.SC_CardProfile.PersonalizedChild))
            {
                string lURL = QueryStringManager.GetEncryptedPageURL("SB URL",
                                                                     QueryStringManager.enumQueryStringKeys.SBContainsPersonalizedCard.ToString() + "=true");

                HttpContext.Current.Response.Redirect(lURL);
            }

            this.NavigationState.SB_Card.GuidID      = Guid.NewGuid();
            this.NavigationState.NavigationPermitted = this.IsNavigationPermitted();

            SessionManager.Set <enumPurchaseTransactionStep>(enumSessionKeys.ShoppingBasketTransactionStatus, enumPurchaseTransactionStep.None);
        }
        /// <summary>
        /// Method Name: GetNextNavigationStepURL.
        /// Method Purpose: Get next navigation step related URL.
        /// Author: Mena Armanyous.
        /// Modification Date: April 27, 2011.
        /// </summary>
        /// <param name="pCurrNavigationStep"></param>
        /// <returns></returns>
        protected override string GetNextNavigationStepURL(Enums.enumNavigationStep pCurrNavigationStep)
        {
            switch (pCurrNavigationStep)
            {
            case enumNavigationStep.StepLoginSelection:
                return(QueryStringManager.GetPageURL("some url"));

            case enumNavigationStep.StepCardSelection:
                return(QueryStringManager.GetPageURL("some url"));

            case enumNavigationStep.StepCardRegistration:
                return(QueryStringManager.GetPageURL("some url"));

            case enumNavigationStep.StepCardTopup:
                return(QueryStringManager.GetPageURL("some url"));

            case enumNavigationStep.StepSignUp:
                return(QueryStringManager.GetPageURL("some url"));

            case enumNavigationStep.StepSecurityInformation:
                return(QueryStringManager.GetPageURL("some url"));

            case enumNavigationStep.StepCardHolderInformation:
                return(QueryStringManager.GetPageURL("some url"));

            case enumNavigationStep.StepShoppingBasket:
                return(QueryStringManager.GetPageURL("some url"));

            case enumNavigationStep.StepConfirmation:
                return(QueryStringManager.GetPageURL("some url"));

            case enumNavigationStep.StepAutoTopup:
                return(QueryStringManager.GetEncryptedPageURL("some url", QueryStringManager.enumQueryStringKeys.NavigationAutoTopup.ToString() + "=true"));

            case enumNavigationStep.StepHome:
                return(QueryStringManager.GetPageURL("some url"));

            case enumNavigationStep.None:
                return(QueryStringManager.GetPageURL("some url"));

            default:
                return(QueryStringManager.GetPageURL("~/FileNotFound.aspx"));
            }
        }