Esempio n. 1
0
        private string GetUserPhoneFormat(DISTANCE_RULE distanceRule)
        {
            if (distanceRule == DISTANCE_RULE.CANONICAL)
            {
                return(PhoneNumberConstants.CANONICAL_FORMAT);
            }

            string result = "";
            string id     = GetUserCountryID();

            if (String.IsNullOrEmpty(id))
            {
                return(String.Empty);
            }

            int userCountryID = int.Parse(id);

            result = registryDataProvider.GetPhoneFormat(userCountryID, distanceRule);
            if (String.IsNullOrEmpty(result))
            {
                result = xmlDataProvider.GetPhoneFormat(userCountryID, distanceRule);
            }

            return(result);
        }