Exemple #1
0
 public SightingVM()
 {
     //SelectedHeroesID = new List<int>();
     HeroList         = new List <SelectListItem>();
     SightingHeroes   = herorepo.GetAllHeroes();
     SightingLocation = locationrepo.GetAllLocations();
 }
        public ActionResult LocationList()
        {
            ILocationRepo locorepo = LocationRepoFactory.Create();
            var           model    = locorepo.GetAllLocations();

            return(View(model.ToList()));
        }
Exemple #3
0
        public OrgVM()
        {
            OrganizationHeroes = new HashSet <Hero>();
            HeroList           = new List <SelectListItem>();
            var AllHeroes = herorepo.GetAllHeroes();

            LocationList = new List <SelectListItem>();
            var AllLocations = locationrepo.GetAllLocations();

            SelectedHeroesID = new List <int>();

            foreach (var locoitem in AllLocations)
            {
                LocationList.Add(new SelectListItem
                {
                    Value = locoitem.LocationID.ToString(),
                    Text  = locoitem.LocationName
                });
            }


            foreach (var item in AllHeroes)
            {
                HeroList.Add(new SelectListItem
                {
                    Value = item.HeroID.ToString(),
                    Text  = item.HeroName
                });
            }
        }
 public void OnGetMeasurement()
 {
     Measurements = _measurements.GetAllSpeedMeasurements();
     Options      = _locations.GetAllLocations().Select(a => new SelectListItem
     {
         Value = a.Id.ToString(),
         Text  = a.Address
     }).ToList();
 }
        public ActionResult <IEnumerable <Location> > GetAllLocations()
        {
            var officeLocations = _repository.GetAllLocations();

            return(Ok(officeLocations));
        }
        public IndexModel(ILocationRepo repositoryLocation)
        {
            LocationRepo = repositoryLocation;

            SortableLocationList = LocationRepo.GetAllLocations();
        }
Exemple #7
0
        public List <Location> GetAllLocations()
        {
            List <Location> locations = repo.GetAllLocations();

            return(locations);
        }
Exemple #8
0
 public void OnGet()
 {
     Locations = _locations.GetAllLocations();
 }
 /// <summary>
 /// Returns list of locations in repository
 /// </summary>
 /// <returns></returns>
 public List <Location> GetAllLocations()
 {
     return(repo.GetAllLocations());
 }
 public IndexModel(ILocationRepo locationRepo)
 {
     _locationRepo       = (ILocationRepo)locationRepo;
     _locationSortedList = _locationRepo.GetAllLocations();
 }
        public List <Locations> GetAllLocations()
        {
            List <Locations> allLocations = locRepo.GetAllLocations();

            return(allLocations);
        }