Exemple #1
0
        /// <summary>
        /// Loads the shipping methods.
        /// </summary>
        /// <returns></returns>
        public IEnumerable <ShippingProviderMethod> LoadShippingMethods()
        {
            //var shippingMethodList = new List<ShippingProviderMethod>();
            var shippingProviders = ShippingProviderHelper.GetAllShippingProvidersIncludingCustomProviders();

            return(shippingProviders.Where(shippingProvider => shippingProvider.GetName().ToLowerInvariant() == Title.ToLowerInvariant()).SelectMany(shippingProvider => shippingProvider.GetAllShippingMethods(Id)));
        }
        private void LoadShippingMethods()
        {
            List <IShippingProvider> shippingProviders = ShippingProviderHelper.GetAllShippingProvidersIncludingCustomProviders();

            //if (shippingProviders == null || shippingProviders.Count <= 0) return;
            foreach (var shippingProvider in shippingProviders.Where(shippingProvider => shippingProvider.GetName() == Name))
            {
                _ShippingMethods = shippingProvider.GetAllShippingMethods(0).ToList();

                break;
            }
        }