private string _FindException(OpenCbsExchangeRateExceptionEnum exception)
		{
			string returned = String.Empty;
			switch(exception)
			{
				case OpenCbsExchangeRateExceptionEnum.ExchangeRateIsNull:
					returned = "ExchangeRateExceptionExchangeRateIsNull.Text";
					break;
				
				case OpenCbsExchangeRateExceptionEnum.DateIsNull:
					returned = "ExchangeRateExceptionDateIsNull.Text";
					break;

				case OpenCbsExchangeRateExceptionEnum.RateIsEmpty:
					returned = "ExchangeRateExceptionRateIsEmpty.Text";
					break;
                case OpenCbsExchangeRateExceptionEnum.CurrencyIsEmpty:
                    returned = "ExchangeRateExceptionCurrencyIsEmpty.Text";
                    break;
                case OpenCbsExchangeRateExceptionEnum.ThisCurrencyIsPivot:
                    returned = "ExchangeRateExceptionThisCurrencyIsPivot.Text";
                    break;
			}
			return returned;
		}
Exemplo n.º 2
0
        private string _FindException(OpenCbsExchangeRateExceptionEnum exception)
        {
            string returned = String.Empty;

            switch (exception)
            {
            case OpenCbsExchangeRateExceptionEnum.ExchangeRateIsNull:
                returned = "ExchangeRateExceptionExchangeRateIsNull.Text";
                break;

            case OpenCbsExchangeRateExceptionEnum.DateIsNull:
                returned = "ExchangeRateExceptionDateIsNull.Text";
                break;

            case OpenCbsExchangeRateExceptionEnum.RateIsEmpty:
                returned = "ExchangeRateExceptionRateIsEmpty.Text";
                break;

            case OpenCbsExchangeRateExceptionEnum.CurrencyIsEmpty:
                returned = "ExchangeRateExceptionCurrencyIsEmpty.Text";
                break;

            case OpenCbsExchangeRateExceptionEnum.ThisCurrencyIsPivot:
                returned = "ExchangeRateExceptionThisCurrencyIsPivot.Text";
                break;
            }
            return(returned);
        }
		public OpenCbsExchangeRateException(OpenCbsExchangeRateExceptionEnum exception)
		{
			_code = _FindException(exception);
		}
Exemplo n.º 4
0
 public OpenCbsExchangeRateException(OpenCbsExchangeRateExceptionEnum exception)
 {
     _code = _FindException(exception);
 }