Ejemplo n.º 1
0
        public JsonResult Floors()
        {
            var buildings = _buildingRepository.GetAll(CurrentOrganization.Id).ToDictionary(_ => _.Id, _ => _.Name);
            var floors    = _floorRepository.GetAllByOrganization(CurrentOrganization.Id);

            return(Json(floors.Select(_ => new { id = _.Id, text = string.Format("{0} - {1}", buildings.TryGetValue(_.BuildingId), _.Name) }).OrderBy(_ => _.text), JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 2
0
        public ActionResult Index()
        {
            var buildings = _buildingRepository.GetAll(CurrentOrganization.Id).ToDictionary(_ => _.Id, _ => _.Name);

            ViewBag.Floors = _floorRepository.GetAllByOrganization(CurrentOrganization.Id)
                             .ToDictionary(_ => _.Id, _ => string.Format("{0} - {1}", buildings.TryGetValue(_.BuildingId), _.Name));
            return(View(_roomRepository.GetRoomInfosForOrganization(CurrentOrganization.Id)));
        }
Ejemplo n.º 3
0
        public ActionResult Index()
        {
            var buildings = _buildingRepository.GetAll(CurrentOrganization.Id).ToDictionary(_ => _.Id, _ => _.Name);

            ViewBag.Buildings = buildings;
            var floors = _floorRepository.GetAllByOrganization(CurrentOrganization.Id).ToDictionary(_ => _.Id, _ => _.Name);

            ViewBag.Rooms = _roomMetadataRepository.GetRoomInfosForOrganization(CurrentOrganization.Id)
                            .ToDictionary(_ => _.Id, _ => string.Format("{0} - {1} - {2}", buildings.TryGetValue(_.BuildingId), floors.TryGetValue(_.FloorId), _.RoomAddress));
            return(View(_deviceRepository.GetForOrganization(CurrentOrganization.Id)));
        }
Ejemplo n.º 4
0
 public ActionResult Index()
 {
     ViewBag.Buildings = _buildingRepository.GetAll(CurrentOrganization.Id).ToDictionary(_ => _.Id, _ => _.Name);
     return(View(_floorRepository.GetAllByOrganization(CurrentOrganization.Id)));
 }