示例#1
0
        private void ConfigureDisplay()
        {
            CultureInfo culture = new CultureInfo(Orchestrator.Globals.Configuration.NativeCulture);

            Facade.IExchangeRates facER = new Facade.ExchangeRates();
            DataSet currencies          = facER.GetAllCurrencies();

            rcbCurrency.Items.Clear();
            RadComboBoxItem rcbi = new RadComboBoxItem("Please Select", "-1");

            rcbCurrency.Items.Add(rcbi);

            if (currencies.Tables.Count > 0 && currencies.Tables[0].Rows.Count > 0)
            {
                foreach (DataRow dr in currencies.Tables[0].Rows)
                {
                    if (dr["CurrencyID"].ToString() != Facade.Culture.GetCurrencySymbol(culture.LCID))
                    {
                        RadComboBoxItem trcbi = new RadComboBoxItem(dr["CurrencyName"].ToString(), dr["CurrencyID"].ToString());
                        rcbCurrency.Items.Add(trcbi);
                    }
                }
            }

            //If only 1 currency available, select it by default.
            if (rcbCurrency.Items.Count == 2)
            {
                rcbCurrency.SelectedIndex = 1;
            }
        }
示例#2
0
        private void ConfigureDisplay()
        {
            Label PageTitle = ((System.Web.UI.UserControl)(Page.Master)).FindControl("lblWizardTitle") as Label;

            if (PageTitle != null)
            {
                PageTitle.Text = "Add Exchange Rate";
            }

            rdiEffectiveFrom.MinDate = DateTime.Today.AddYears(-1);
            rntExchangeRate.Culture.NumberFormat.NumberDecimalDigits = 5;

            //rntExchangeRate.MaxValue = 5.00000;
            //rntExchangeRate.MinValue = 0.00001;
            //rntExchangeRate.MaxLength = 7;
            //rntExchangeRate.Culture.NumberFormat.CurrencyDecimalDigits = 5;

            Facade.ExchangeRates facER = new Facade.ExchangeRates();
            DataSet currencies         = facER.GetAllCurrencies();

            rcbCurrency.Items.Clear();
            RadComboBoxItem rcbi = new RadComboBoxItem("Please Select", "-1");

            rcbCurrency.Items.Add(rcbi);

            CultureInfo culture = new CultureInfo(Orchestrator.Globals.Configuration.NativeCulture);

            foreach (DataRow dr in currencies.Tables[0].Rows)
            {
                if (dr["CurrencyID"].ToString() != Facade.Culture.GetCurrencySymbol(culture.LCID))
                {
                    RadComboBoxItem trcbi = new RadComboBoxItem(dr["CurrencyName"].ToString(), dr["CurrencyID"].ToString());
                    rcbCurrency.Items.Add(trcbi);
                }
            }
        }