Beispiel #1
0
        public void LoadCountryObject(ILookupServiceRepository lookupServiceRepository)
        {
            ICountry country = default(Country);

            if (CountryId != string.Empty)
            {
                IList <ICountry> countries = lookupServiceRepository.GetAllCountry();
                if (countries.Count != 0)
                {
                    country = countries.SingleOrDefault(x => x.Id == CountryId);
                }
            }

            this.CountryObject = country;
        }
Beispiel #2
0
        public static IList <ICountry> GetCountries1(ILookupServiceRepository lookupServiceRepository)
        {
            string cacheKey  = LanguagePrefix() + CacheKeys.CountryList;
            object countries = CacheManager.Get(cacheKey);

            if (countries == null)
            {
                IList <ICountry> returnList = lookupServiceRepository.GetAllCountry();
                CacheManager.Add(cacheKey, returnList);
                return(returnList);
            }
            else
            {
                return((IList <ICountry>)countries);
            }
        }
Beispiel #3
0
 public void LoadList(ILookupServiceRepository lookupServiceRepository)
 {
     this.ListCountry = lookupServiceRepository.GetAllCountry();
 }