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;
		}
示例#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);
		}
示例#4
0
 public OpenCbsExchangeRateException(OpenCbsExchangeRateExceptionEnum exception)
 {
     _code = _FindException(exception);
 }