コード例 #1
0
        public object GetCommunities(string countryCode, string countyorprovincecode, string countyorprovincename)
        {
            string     TerritoryName = CountryStatic.GetCountryCodeAndName(countryCode);
            Type       territoryType = Type.GetType(string.Format(Constants.SP_DAL_QUALIFIEDNAME, TerritoryName));
            MethodInfo mi            = typeof(TerritoriesService).GetMethod("GetGenericCommunities").MakeGenericMethod(territoryType);
            var        Communities   = mi.Invoke(this, new string[] { countyorprovincecode ?? "", countyorprovincename });

            return(Communities);
        }
コード例 #2
0
        public object GetStates(string countryCode)
        {
            string     TerritoryName = CountryStatic.GetCountryCodeAndName(countryCode);
            Type       territoryType = Type.GetType(string.Format(Constants.SP_DAL_QUALIFIEDNAME, TerritoryName));
            MethodInfo mi            = typeof(TerritoriesService).GetMethod("GetGenericStates").MakeGenericMethod(territoryType);
            var        states        = mi.Invoke(this, null);

            return(states);
        }