Пример #1
0
        private List <string> GetOnlyLocationNames()
        {
            List <Location> locations = _profileRepository.GetLocations();
            List <string>   locNames  = new List <string>();

            foreach (Location loc in locations)
            {
                if (!locNames.Contains(loc.Name))
                {
                    locNames.Add(loc.Name);
                }
            }

            return(locNames);
        }
Пример #2
0
        public void GetLocations()
        {
            _locations = _repository.GetLocations();

            List <string> locationNames = GetOnlyLocationNames();

            if (locationNames != null && locationNames.Count > 0)
            {
                _view.Locations = locationNames;
            }
        }