protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            if (!IsPostBack)
            {
                //Load currencies
                DrpCurrencies.DataSource = CurrencyService.Instance.GetAll(country.StoreId);
                DrpCurrencies.DataBind();

                LoadShippingAndPaymentMethods(country.Id);

                TxtName.Text                = country.Name;
                TxtRegionCode.Text          = country.RegionCode;
                DrpCurrencies.SelectedValue = country.DefaultCurrencyId.ToString();

                if (country.DefaultShippingMethodId != null)
                {
                    DrpShippingMethods.SelectedValue = country.DefaultShippingMethodId.Value.ToString();
                }
                if (country.DefaultPaymentMethodId != null)
                {
                    DrpPaymentMethods.SelectedValue = country.DefaultPaymentMethodId.Value.ToString();
                }
            }
        }
Ejemplo n.º 2
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            if (!IsPostBack)
            {
                //Load currencies
                ICurrencyService currencyService = CurrencyService.Instance;
                DrpCurrencies.DataSource = currencyService.GetAll(_giftCard.StoreId);
                DrpCurrencies.DataBind();

                LitCode.Text            = _giftCard.Code;
                TxtOriginalAmount.Text  = _giftCard.OriginalAmount.ToString("0.####");
                TxtRemainingAmount.Text = _giftCard.RemainingAmount.ToString("0.####");
                if (!DrpCurrencies.Items.TrySelectByValue(_giftCard.CurrencyId))
                {
                    Currency currency = currencyService.Get(_giftCard.StoreId, _giftCard.CurrencyId);
                    if (currency != null)
                    {
                        DrpCurrencies.Items.Add(new ListItem("* " + currency.Name, currency.Id.ToString(CultureInfo.InvariantCulture)));
                        DrpCurrencies.Items.TrySelectByValue(_giftCard.CurrencyId);
                    }
                }
                DPValidTo.DateTime = _giftCard.DateValidTo;
            }
        }
Ejemplo n.º 3
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            if (!IsPostBack)
            {
                DrpCurrencies.DataSource = CurrencyService.Instance.GetAll(StoreId);
                DrpCurrencies.DataBind();
            }
        }
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            if (!IsPostBack)
            {
                DrpCurrencies.DataSource = CurrencyService.Instance.GetAll(StoreId);
                DrpCurrencies.DataBind();

                IEnumerable <DefaultCountry> defaultCountries = CountryService.Instance.GetDefaultCountries();

                DrpCountries.DataSource = defaultCountries;
                DrpCountries.DataBind();
            }
        }
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            if (!IsPostBack)
            {
                PnlLicenseCheck.Visible = !LicenseService.Instance.ValidateLicenseFeatures(Feature.Marketing);

                DrpCurrencies.DataSource = CurrencyService.Instance.GetAll(StoreId);
                DrpCurrencies.DataBind();

                TxtCode.Text        = (string)Session["GiftCard_Search_Code"];
                TxtOrderNumber.Text = (string)Session["GiftCard_Search_OrderNumber"];
                DrpCurrencies.Items.TrySelectByValue((long?)Session["GiftCard_Search_Currency"]);
                DPStart.DateTime = (DateTime?)Session["GiftCard_Search_StartDate"] ?? DateTime.MinValue;
                DPEnd.DateTime   = (DateTime?)Session["GiftCard_Search_EndDate"] ?? DateTime.MinValue;

                Search();
            }
        }