public override CheckLogicResult CheckLogic()
        {
            if (!HasValidConfiguration())
            {
                return(CheckLogicResult.Failure(RedirectToAction("EnrollmentConfiguration")));
            }

            if (!HasValidPackDetails(Cart.Items))
            {
                return(CheckLogicResult.Failure(RedirectToAction("Packs")));
            }

            //if (!HasValidOrderDetails(Cart.Items))
            //{
            //    return CheckLogicResult.Failure(RedirectToAction("ProductList"));
            //}

            if (!HasValidShippingAddress(PropertyBag.ShippingAddress))
            {
                return(CheckLogicResult.Failure(RedirectToAction("EnrolleeInfo")));
            }

            if (!HasValidPaymentMethod(PropertyBag.PaymentMethod))
            {
                return(CheckLogicResult.Failure(RedirectToAction("EnrolleeInfo")));
            }

            return(CheckLogicResult.Success(RedirectToAction("Review")));
        }
        public override CheckLogicResult CheckLogic()
        {
            if (!HasValidOrderDetails(Cart.Items))
            {
                return(CheckLogicResult.Failure(RedirectToAction("Cart")));
            }

            if (!IsAuthenticated())
            {
                var helper = new UrlHelper(HttpContext.Current.Request.RequestContext);
                return(CheckLogicResult.Failure(RedirectToAction("Login", "Account", new RouteValueDictionary
                {
                    { "ReturnUrl", HttpContext.Current.Request.Url }
                })));
            }

            if (!HasValidShippingAddress(PropertyBag.ShippingAddress))
            {
                return(CheckLogicResult.Failure(RedirectToAction("Shipping")));
            }

            if (!HasValidAutoOrderDetails(Cart.Items))
            {
                return(CheckLogicResult.Failure(RedirectToAction("AutoOrder")));
            }

            if (!HasValidPaymentMethod(PropertyBag.PaymentMethod))
            {
                return(CheckLogicResult.Failure(RedirectToAction("Payment")));
            }

            return(CheckLogicResult.Success(RedirectToAction("Review")));
        }
예제 #3
0
        public override CheckLogicResult CheckLogic()
        {
            if (AccontStatusNotAllowed())
            {
                return(CheckLogicResult.Failure(RedirectToAction("AccountStatus")));
            }

            return(CheckLogicResult.Success(RedirectToAction("Index", "Dashboard")));
        }
        public override CheckLogicResult CheckLogic()
        {
            if (!HasValidOrderDetails(Cart.Items))
            {
                return(CheckLogicResult.Failure(RedirectToAction("Cart")));
            }

            if (!HasValidShippingAddress(PropertyBag.ShippingAddress))
            {
                return(CheckLogicResult.Failure(RedirectToAction("Shipping")));
            }

            if (!HasValidPaymentMethod(PropertyBag.PaymentMethod))
            {
                return(CheckLogicResult.Failure(RedirectToAction("Payment")));
            }

            return(CheckLogicResult.Success(RedirectToAction("Review")));
        }
예제 #5
0
        public override CheckLogicResult CheckLogic()
        {
            if (!HasEnroller())
            {
                return(CheckLogicResult.Failure(RedirectToAction("EnrollmentConfiguration")));
            }

            if (!HasEnrollmentPack(Cart))
            {
                return(CheckLogicResult.Failure(RedirectToAction("Packs")));
            }

            if (!HasValidShippingAddress(PropertyBag.ShippingAddress))
            {
                return(CheckLogicResult.Failure(RedirectToAction("EnrolleeInfo")));
            }

            if (!HasValidPaymentMethod(PropertyBag.PaymentMethod))
            {
                return(CheckLogicResult.Failure(RedirectToAction("EnrolleeInfo")));
            }

            return(CheckLogicResult.Success(RedirectToAction("Review")));
        }