Пример #1
0
        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;
        }
Пример #2
0
        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);
        }
Пример #3
0
 public OpenCbsTellerException(OpenCbsTellerExceptionEnum exceptionCode)
 {
     _code = exceptionCode;
     _message = FindException(exceptionCode);
 }
Пример #4
0
 protected OpenCbsTellerException(SerializationInfo info, StreamingContext context, List<string> options)
     : base(info, context)
 {
     _code = (OpenCbsTellerExceptionEnum)info.GetInt32("Code");
     AdditionalOptions = options;
 }
Пример #5
0
 protected OpenCbsTellerException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     _code = (OpenCbsTellerExceptionEnum)info.GetInt32("Code");
 }
Пример #6
0
 public OpenCbsTellerException(OpenCbsTellerExceptionEnum exceptionCode)
 {
     _code    = exceptionCode;
     _message = FindException(exceptionCode);
 }
Пример #7
0
 protected OpenCbsTellerException(SerializationInfo info, StreamingContext context, List <string> options)
     : base(info, context)
 {
     _code             = (OpenCbsTellerExceptionEnum)info.GetInt32("Code");
     AdditionalOptions = options;
 }
Пример #8
0
 protected OpenCbsTellerException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     _code = (OpenCbsTellerExceptionEnum)info.GetInt32("Code");
 }