Пример #1
0
		private string _FindException(OpenCbsAccountExceptionsEnum exceptionId)
		{
			string returned = String.Empty;
			switch(exceptionId)
			{
				case OpenCbsAccountExceptionsEnum.AccountIsNull:
					returned = "AccountExceptionAccountIsNull.Text";
					break;

				case OpenCbsAccountExceptionsEnum.LabelIsNull:
					returned = "AccountExceptionLabelIsNull.Text";
					break;
					
				case OpenCbsAccountExceptionsEnum.LocalNumberIsNull:
					returned = "AccountExceptionLocalNumberIsNull.Text";
					break;
					
				case OpenCbsAccountExceptionsEnum.NumberIsNull:
					returned = "AccountExceptionNumberIsNull.Text";
					break;

				case OpenCbsAccountExceptionsEnum.IncorrectAmountFormat:
					returned = "AccountExceptionIncorrectAmountFormat.Text";
					break;

				case OpenCbsAccountExceptionsEnum.MovementSetUnbalanced:
					returned = "AccountExceptionMovementSetUnbalanced.Text";
					break;

				case OpenCbsAccountExceptionsEnum.ProvisioningRateNbOfDaysMaxEmpty:
					returned = "ProvisioningRateNbOfDaysMaxEmpty.Text";
					break;

				case OpenCbsAccountExceptionsEnum.ProvisioningRateNbOfDaysMinEmpty:
					returned = "ProvisioningRateNbOfDaysMinEmpty.Text";
					break;

				case OpenCbsAccountExceptionsEnum.ProvisioningRateRateEmpty:
					returned = "ProvisioningRateRateEmpty.Text";
					break;
                case OpenCbsAccountExceptionsEnum.LoanScaleTableMin:
                    returned = "LoanScaleTableMin.Text";
                    break;
                case OpenCbsAccountExceptionsEnum.LoanScaleTableMax:
                    returned = "LoanScaleTableMax.Text";
                    break;
                case OpenCbsAccountExceptionsEnum.CurrencyAlreadyExists:
                    returned = "CurrencyAlreadyExists.Text";
                    break;
                case OpenCbsAccountExceptionsEnum.MaximumCurrencyLimitReached:
                    returned = "MaximumCurrencyLimitReached.Text";
                    break;
                case OpenCbsAccountExceptionsEnum.CurrencyIsEmpty:
                    returned = "AccountExceptionCurrencyIsNull.Text.Text";
                    break;
                case OpenCbsAccountExceptionsEnum.DescriptionIsEmpty:
                    returned = "AccountExceptionDescriptionIsEmpty.Text";
                    break;
                case OpenCbsAccountExceptionsEnum.AccountCannotBeDeleted:
                    returned = "AccountExceptionCannotBeDeleted.Text";
                    break;
                case OpenCbsAccountExceptionsEnum.ParentAccountDoesntExists:
                    returned = "AccountExceptionParentAccountDoesntExists.Text";
                    break;
                case OpenCbsAccountExceptionsEnum.ParentAccountNotSameDescription:
                    returned = "AccountExceptionParentAccountNotSameDescription.Text";
                    break;
                case OpenCbsAccountExceptionsEnum.ParentAccountIsInvalid:
                    returned = "AccountExceptionParentAccountIsInvalid.Text";
                    break;
                case OpenCbsAccountExceptionsEnum.EqualAccounts :
			        returned = "ManualEntrySameAccount.Text";
			        break;
                case OpenCbsAccountExceptionsEnum.AccountIsUsed :
			        returned = "AccountExceptionIsUsed.Text";
			        break;
                case OpenCbsAccountExceptionsEnum.ImportIdExist:
			        returned = "AccountImportIdExist.Text";
                    break;
                case OpenCbsAccountExceptionsEnum.ImportNumbersExist:
                    returned = "AccountImportNumbersExist.Text";
                    break;
                case OpenCbsAccountExceptionsEnum.DuplicatedAccount:
			        returned = "DuplicatedAccount.Text";
                    break;
			}
			return returned;
		}
Пример #2
0
        private string _FindException(OpenCbsAccountExceptionsEnum exceptionId)
        {
            string returned = String.Empty;

            switch (exceptionId)
            {
            case OpenCbsAccountExceptionsEnum.AccountIsNull:
                returned = "AccountExceptionAccountIsNull.Text";
                break;

            case OpenCbsAccountExceptionsEnum.LabelIsNull:
                returned = "AccountExceptionLabelIsNull.Text";
                break;

            case OpenCbsAccountExceptionsEnum.LocalNumberIsNull:
                returned = "AccountExceptionLocalNumberIsNull.Text";
                break;

            case OpenCbsAccountExceptionsEnum.NumberIsNull:
                returned = "AccountExceptionNumberIsNull.Text";
                break;

            case OpenCbsAccountExceptionsEnum.IncorrectAmountFormat:
                returned = "AccountExceptionIncorrectAmountFormat.Text";
                break;

            case OpenCbsAccountExceptionsEnum.MovementSetUnbalanced:
                returned = "AccountExceptionMovementSetUnbalanced.Text";
                break;

            case OpenCbsAccountExceptionsEnum.ProvisioningRateNbOfDaysMaxEmpty:
                returned = "ProvisioningRateNbOfDaysMaxEmpty.Text";
                break;

            case OpenCbsAccountExceptionsEnum.ProvisioningRateNbOfDaysMinEmpty:
                returned = "ProvisioningRateNbOfDaysMinEmpty.Text";
                break;

            case OpenCbsAccountExceptionsEnum.ProvisioningRateRateEmpty:
                returned = "ProvisioningRateRateEmpty.Text";
                break;

            case OpenCbsAccountExceptionsEnum.LoanScaleTableMin:
                returned = "LoanScaleTableMin.Text";
                break;

            case OpenCbsAccountExceptionsEnum.LoanScaleTableMax:
                returned = "LoanScaleTableMax.Text";
                break;

            case OpenCbsAccountExceptionsEnum.CurrencyAlreadyExists:
                returned = "CurrencyAlreadyExists.Text";
                break;

            case OpenCbsAccountExceptionsEnum.MaximumCurrencyLimitReached:
                returned = "MaximumCurrencyLimitReached.Text";
                break;

            case OpenCbsAccountExceptionsEnum.CurrencyIsEmpty:
                returned = "AccountExceptionCurrencyIsNull.Text.Text";
                break;

            case OpenCbsAccountExceptionsEnum.DescriptionIsEmpty:
                returned = "AccountExceptionDescriptionIsEmpty.Text";
                break;

            case OpenCbsAccountExceptionsEnum.AccountCannotBeDeleted:
                returned = "AccountExceptionCannotBeDeleted.Text";
                break;

            case OpenCbsAccountExceptionsEnum.ParentAccountDoesntExists:
                returned = "AccountExceptionParentAccountDoesntExists.Text";
                break;

            case OpenCbsAccountExceptionsEnum.ParentAccountNotSameDescription:
                returned = "AccountExceptionParentAccountNotSameDescription.Text";
                break;

            case OpenCbsAccountExceptionsEnum.ParentAccountIsInvalid:
                returned = "AccountExceptionParentAccountIsInvalid.Text";
                break;

            case OpenCbsAccountExceptionsEnum.EqualAccounts:
                returned = "ManualEntrySameAccount.Text";
                break;

            case OpenCbsAccountExceptionsEnum.AccountIsUsed:
                returned = "AccountExceptionIsUsed.Text";
                break;

            case OpenCbsAccountExceptionsEnum.ImportIdExist:
                returned = "AccountImportIdExist.Text";
                break;

            case OpenCbsAccountExceptionsEnum.ImportNumbersExist:
                returned = "AccountImportNumbersExist.Text";
                break;

            case OpenCbsAccountExceptionsEnum.DuplicatedAccount:
                returned = "DuplicatedAccount.Text";
                break;
            }
            return(returned);
        }
Пример #3
0
		public OpenCbsAccountException(OpenCbsAccountExceptionsEnum exceptionCode)
		{
			_code = _FindException(exceptionCode);
		}
Пример #4
0
 public OpenCbsAccountException(OpenCbsAccountExceptionsEnum exceptionCode)
 {
     _code = _FindException(exceptionCode);
 }