コード例 #1
0
        private string TranslateSchemeFieldException(SchemeFieldException schemeFieldException)
        {
            string translatedMessage = null;

            switch (schemeFieldException.Exception.Message)
            {
                case "The post code is mandatory.":
                    translatedMessage = string.Format("PCS {0} is missing an organisation contact postcode.",
                        schemeFieldException.Scheme.SchemeName);
                    break;
                case "The customer reference is mandatory.":
                    translatedMessage = string.Format("PCS {0} is missing a billing reference.",
                        schemeFieldException.Scheme.SchemeName);
                    break;
                default:
                    ThrowUnableToTranslateError(schemeFieldException);
                    break;
            }

            return translatedMessage;
        }
コード例 #2
0
        private string TranslateSchemeFieldException(SchemeFieldException schemeFieldException)
        {
            string translatedMessage = null;

            switch (schemeFieldException.Exception.Message)
            {
            case "The post code is mandatory.":
                translatedMessage = string.Format("PCS {0} is missing an organisation contact postcode.",
                                                  schemeFieldException.Scheme.SchemeName);
                break;

            case "The customer reference is mandatory.":
                translatedMessage = string.Format("PCS {0} is missing a billing reference.",
                                                  schemeFieldException.Scheme.SchemeName);
                break;

            default:
                ThrowUnableToTranslateError(schemeFieldException);
                break;
            }

            return(translatedMessage);
        }