Ejemplo n.º 1
0
        private void cboCurrency_SelectedIndexChanged(object sender, EventArgs e)
        {
            Guid id = Guid.Empty;

            if (Guid.TryParse(cboCurrency.SelectedValue.ToString(), out id))
            {
                txtExchangeRate.Text = CurrencyEx.GetExchangeRateById(id).ToString("n4");
                updateCurrency(new System.Guid(cboCurrency.SelectedValue.ToString()));
            }
        }
Ejemplo n.º 2
0
        private void cboCurrency_SelectedIndexChanged(object sender, EventArgs e)
        {
            var id = Guid.Empty;

            if (cboCurrency.SelectedValue != null)
            {
                if (Guid.TryParse(cboCurrency.SelectedValue.ToString(), out id))
                {
                    if (id != Guid.Empty)
                    {
                        txtExchangeRate.Text = CurrencyEx.GetExchangeRateById(id).ToString("n4");
                    }
                }
            }
        }