public ActionResult BlockEdit(int id)
        {
            Blocks block = _serviceBlocks.GetById(id);
            List<CheckedModel> chckBlockFloorList = new List<CheckedModel>();
            IEnumerable<Floors> floorList = _servisceFloors.GetAll().Where(s => s.IsActive);
            foreach (var item in floorList)
            {
                CheckedModel befm = new CheckedModel();
                befm.Name = item.Name;
                befm.Id = item.Id;
                befm.IsChecked = block.BlockFloors.Where(x => x.FloorId == item.Id).Count() > 0;
                chckBlockFloorList.Add(befm);
            }

            ViewBag.FloorList = chckBlockFloorList;

            return View(block.EntityToModel(true));
        }
        public ActionResult RoomTypeDetails(int id)
        {
            List<CheckedModel> chckList = new List<CheckedModel>();
            IEnumerable<RoomFeatures> featurelist = _serviceRoomFeatures.GetAll().Where(x => x.IsActive);
            RoomTypes rt = _serviceRooms.GetById(id).RoomType;
            IEnumerable<RoomFeaturesRoomTypes> rfrtList = _serviceRoomFeaturesRoomTypes.GetAll().Where(s => s.RoomTypeId == rt.Id);

            foreach (var item in featurelist)
            {
                CheckedModel chck = new CheckedModel()
             {
                 Id = item.Id,
                 Name = item.Name,
                 IsChecked = rfrtList.Where(s => s.RoomFeatureId == item.Id).Count() > 0
             };
                chckList.Add(chck);
            }
            ViewBag.FeatureList = chckList;
            return View();
        }
        public ActionResult RoomEdit(int id)
        {
            Rooms editRoom = _serviceRooms.GetById(id);
            var floors = _serviceBlockFloors.GetAll().OrderBy(x => x.Block.BlockName).Select(x => new SelectListItem { Text = x.Block.BlockName + " - " + x.Floor.Name, Value = x.Id.ToString(), Selected = editRoom.BlockFloor.Id == x.Id }).ToList();
            var rooms = _serviceRoomTypes.GetAll().Select(x => new SelectListItem { Text = x.Name, Value = x.Id.ToString(), Selected = editRoom.RoomType.Id == x.Id }).ToList();
            IEnumerable<Statuses> statuslist = _serviceStatuses.GetAll().Where(x => x.IsActive);
            List<CheckedModel> chckRoomStatusList = new List<CheckedModel>();
            foreach (var item in statuslist)
            {
                CheckedModel chckModel = new CheckedModel();
                chckModel.Id = item.Id;
                chckModel.Name = item.Name;
                chckModel.IsChecked = _serviceRooms.GetById(id).RoomStatuses.Where(x => x.StatusId == item.Id).Count() > 0;
                chckRoomStatusList.Add(chckModel);

            }
            ViewBag.StatusList = chckRoomStatusList;
            ViewBag.BlockFloorId = floors;
            ViewBag.RoomTypeId = rooms;

            return View(editRoom.EntityToModel());
        }