コード例 #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;
        }
コード例 #2
0
ファイル: Utility.cs プロジェクト: odchie/PMS
        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);
            }
        }
コード例 #3
0
 public void LoadList(ILookupServiceRepository lookupServiceRepository)
 {
     this.ListCountry = lookupServiceRepository.GetAllCountry();
 }