private static string FindException(OpenCbsTellerExceptionEnum exceptionId)
        {
            string returned = String.Empty;
            switch (exceptionId)
            {
                case OpenCbsTellerExceptionEnum.NameIsEmpty:
                    returned = "TellerNameIsEmpty.Text";
                    break;
                
                case OpenCbsTellerExceptionEnum.AccountIsEmpty:
                    returned = "TellerAccountIsEmpty.Text";
                    break;

                case OpenCbsTellerExceptionEnum.BranchIsEmpty:
                    returned = "TellerBranchIsEmpty.Text";
                    break;

                case OpenCbsTellerExceptionEnum.CurrencyIsEmpty:
                    returned = "TellerCurrencyIsEmpty.Text";
                    break;

                case OpenCbsTellerExceptionEnum.UserIsEmpty:
                    returned = "TellerUserIsEmpty.Text";
                    break;

                case OpenCbsTellerExceptionEnum.NameIsExists:
                    returned = "TellerNameIsExists.Text";
                    break;

                case OpenCbsTellerExceptionEnum.MinMaxAmountIsInvalid:
                    returned = "TellerAmountMinMaxIsInvalid.Text";
                    break;

                case OpenCbsTellerExceptionEnum.VaultExists:
                    returned = "TellerVaultExists.Text";
                    break;

            }
            return returned;
        }
        private static string FindException(OpenCbsTellerExceptionEnum exceptionId)
        {
            string returned = String.Empty;

            switch (exceptionId)
            {
            case OpenCbsTellerExceptionEnum.NameIsEmpty:
                returned = "TellerNameIsEmpty.Text";
                break;

            case OpenCbsTellerExceptionEnum.AccountIsEmpty:
                returned = "TellerAccountIsEmpty.Text";
                break;

            case OpenCbsTellerExceptionEnum.BranchIsEmpty:
                returned = "TellerBranchIsEmpty.Text";
                break;

            case OpenCbsTellerExceptionEnum.CurrencyIsEmpty:
                returned = "TellerCurrencyIsEmpty.Text";
                break;

            case OpenCbsTellerExceptionEnum.UserIsEmpty:
                returned = "TellerUserIsEmpty.Text";
                break;

            case OpenCbsTellerExceptionEnum.NameIsExists:
                returned = "TellerNameIsExists.Text";
                break;

            case OpenCbsTellerExceptionEnum.MinMaxAmountIsInvalid:
                returned = "TellerAmountMinMaxIsInvalid.Text";
                break;

            case OpenCbsTellerExceptionEnum.VaultExists:
                returned = "TellerVaultExists.Text";
                break;
            }
            return(returned);
        }
 public OpenCbsTellerException(OpenCbsTellerExceptionEnum exceptionCode)
 {
     _code = exceptionCode;
     _message = FindException(exceptionCode);
 }
 protected OpenCbsTellerException(SerializationInfo info, StreamingContext context, List<string> options)
     : base(info, context)
 {
     _code = (OpenCbsTellerExceptionEnum)info.GetInt32("Code");
     AdditionalOptions = options;
 }
 protected OpenCbsTellerException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     _code = (OpenCbsTellerExceptionEnum)info.GetInt32("Code");
 }
 public OpenCbsTellerException(OpenCbsTellerExceptionEnum exceptionCode)
 {
     _code    = exceptionCode;
     _message = FindException(exceptionCode);
 }
 protected OpenCbsTellerException(SerializationInfo info, StreamingContext context, List <string> options)
     : base(info, context)
 {
     _code             = (OpenCbsTellerExceptionEnum)info.GetInt32("Code");
     AdditionalOptions = options;
 }
 protected OpenCbsTellerException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     _code = (OpenCbsTellerExceptionEnum)info.GetInt32("Code");
 }