Esempio n. 1
0
        public OrderPlaceEditModel GetEventPackageList(string guid)
        {
            var onlineRequestValidationModel = _tempcartService.ValidateOnlineRequest(guid);

            if (onlineRequestValidationModel.RequestStatus != OnlineRequestStatus.Valid)
            {
                return new OrderPlaceEditModel()
                       {
                           RequestValidationModel = onlineRequestValidationModel
                       }
            }
            ;

            var tempCart = onlineRequestValidationModel.TempCart;

            var returnObj = _onlinePackageService.GetEventPackageList(tempCart);

            returnObj.RequestValidationModel = onlineRequestValidationModel;

            if (tempCart.EventId.HasValue && tempCart.EventId > 0 && !string.IsNullOrEmpty(tempCart.Gender) && tempCart.EventPackageId.HasValue)
            {
                returnObj.UpsellTestAvailable = _onlinePackageService.IsUpsellTestAvailable(tempCart);

                var allAdditionalTests = _onlinePackageService.GetAdditionalTest(tempCart);
                returnObj.IsAdditionalTestAvailable = allAdditionalTests != null && allAdditionalTests.Any();
            }

            return(returnObj);
        }
        public EventAppointmentOnlineListModel GetEventAppointmentSlotOnline(string guid)
        {
            var onlineRequestValidationModel = _tempcartService.ValidateOnlineRequest(guid);

            if (onlineRequestValidationModel.RequestStatus != OnlineRequestStatus.Valid)
            {
                return new EventAppointmentOnlineListModel()
                       {
                           RequestValidationModel = onlineRequestValidationModel
                       }
            }
            ;

            var model = _onlineAppointmentService.GetEventAppointmentSlotOnline(onlineRequestValidationModel.TempCart);

            model.RequestValidationModel = onlineRequestValidationModel;

            var tempCart = onlineRequestValidationModel.TempCart;

            if (tempCart.EventId.HasValue && tempCart.EventId > 0 && tempCart.EventPackageId.HasValue)
            {
                var allAdditionalTests = _onlinePackageService.GetAdditionalTest(tempCart);

                model.IsAdditionalTestAvailable = allAdditionalTests != null && allAdditionalTests.Any();
                model.UpsellTestAvailable       = _onlinePackageService.IsUpsellTestAvailable(tempCart);
            }
            return(model);
        }