Example #1
0
        private void FillDropDowns()
        {
            //discunt types
            this.ddlDiscountType.Items.Clear();
            var discountTypes = DiscountManager.GetAllDiscountTypes();

            foreach (DiscountType discountType in discountTypes)
            {
                ListItem item2 = new ListItem(discountType.Name, discountType.DiscountTypeId.ToString());
                this.ddlDiscountType.Items.Add(item2);
            }

            //discount requirements
            this.ddlDiscountRequirement.Items.Clear();
            var discountRequirements = DiscountManager.GetAllDiscountRequirements();

            foreach (DiscountRequirement discountRequirement in discountRequirements)
            {
                ListItem item2 = new ListItem(discountRequirement.Name, discountRequirement.DiscountRequirementId.ToString());
                this.ddlDiscountRequirement.Items.Add(item2);
            }

            //discount limitations
            this.ddlDiscountLimitation.Items.Clear();
            var discountLimitations = DiscountManager.GetAllDiscountLimitations();

            foreach (DiscountLimitation discountLimitation in discountLimitations)
            {
                ListItem item2 = new ListItem(discountLimitation.Name, discountLimitation.DiscountLimitationId.ToString());
                this.ddlDiscountLimitation.Items.Add(item2);
            }

            //required billing countries
            this.ddlRequirementBillingCountryIs.Items.Clear();
            ListItem rbciEmpty = new ListItem(GetLocaleResourceString("Admin.DiscountInfo.RequirementBillingCountryIs.SelectCountry"), "0");

            this.ddlRequirementBillingCountryIs.Items.Add(rbciEmpty);
            var billingCountries = CountryManager.GetAllCountriesForBilling();

            foreach (Country country in billingCountries)
            {
                ListItem ddlCountryItem2 = new ListItem(country.Name, country.CountryId.ToString());
                this.ddlRequirementBillingCountryIs.Items.Add(ddlCountryItem2);
            }

            //required shipping countries
            this.ddlRequirementShippingCountryIs.Items.Clear();
            ListItem rsciEmpty = new ListItem(GetLocaleResourceString("Admin.DiscountInfo.RequirementShippingCountryIs.SelectCountry"), "0");

            this.ddlRequirementShippingCountryIs.Items.Add(rsciEmpty);
            var shippingCountries = CountryManager.GetAllCountriesForShipping();

            foreach (Country country in shippingCountries)
            {
                ListItem ddlCountryItem2 = new ListItem(country.Name, country.CountryId.ToString());
                this.ddlRequirementShippingCountryIs.Items.Add(ddlCountryItem2);
            }
        }
Example #2
0
        private void FillCountryDropDownsForBilling()
        {
            this.ddlCountry.Items.Clear();
            var countryCollection = CountryManager.GetAllCountriesForBilling();

            foreach (var country in countryCollection)
            {
                var ddlCountryItem2 = new ListItem(country.Name, country.CountryId.ToString());
                this.ddlCountry.Items.Add(ddlCountryItem2);
            }
        }
Example #3
0
        protected void FillCountryDropDowns()
        {
            this.ddlCountry.Items.Clear();
            List <Country> countryCollection = null;

            if (IsBillingAddress)
            {
                countryCollection = CountryManager.GetAllCountriesForBilling();
            }
            else
            {
                countryCollection = CountryManager.GetAllCountriesForShipping();
            }
            foreach (Country country in countryCollection)
            {
                ListItem ddlCountryItem2 = new ListItem(country.Name, country.CountryId.ToString());
                this.ddlCountry.Items.Add(ddlCountryItem2);
            }
        }
Example #4
0
        private void FillDropDowns()
        {
            //order statuses
            this.ddlOrderStatus.Items.Clear();
            ListItem itemOrderStatus = new ListItem(GetLocaleResourceString("Admin.Common.All"), "0");

            this.ddlOrderStatus.Items.Add(itemOrderStatus);
            var orderStatuses = OrderManager.GetAllOrderStatuses();

            foreach (OrderStatus orderStatus in orderStatuses)
            {
                ListItem item2 = new ListItem(OrderManager.GetOrderStatusName(orderStatus.OrderStatusId), orderStatus.OrderStatusId.ToString());
                this.ddlOrderStatus.Items.Add(item2);
            }

            //payment statuses
            this.ddlPaymentStatus.Items.Clear();
            ListItem itemPaymentStatus = new ListItem(GetLocaleResourceString("Admin.Common.All"), "0");

            this.ddlPaymentStatus.Items.Add(itemPaymentStatus);
            var paymentStatuses = PaymentStatusManager.GetAllPaymentStatuses();

            foreach (PaymentStatus paymentStatus in paymentStatuses)
            {
                ListItem item2 = new ListItem(PaymentStatusManager.GetPaymentStatusName(paymentStatus.PaymentStatusId), paymentStatus.PaymentStatusId.ToString());
                this.ddlPaymentStatus.Items.Add(item2);
            }

            //countries
            ddlBillingCountry.Items.Clear();
            ListItem itemBillingCountry = new ListItem(GetLocaleResourceString("Admin.Common.All"), "0");

            this.ddlBillingCountry.Items.Add(itemBillingCountry);
            var countries = CountryManager.GetAllCountriesForBilling();

            foreach (var country in countries)
            {
                ListItem ddlCountryItem2 = new ListItem(country.Name, country.CountryId.ToString());
                ddlBillingCountry.Items.Add(ddlCountryItem2);
            }
        }