private List <string> GetViewRoomOptions(RoomOptionModel roomOptionModel) { var roomOptions = new List <string>(); if (roomOptionModel.OnePersonBed >= 1) { roomOptions.Add($"1 osobowe łóżka: {roomOptionModel.OnePersonBed}"); } if (roomOptionModel.TwoPersonBed >= 1) { roomOptions.Add($"2 osobowe łóżka: {roomOptionModel.TwoPersonBed}"); } if (roomOptionModel.AirConditioning) { roomOptions.Add("Klimatyzacja"); } if (roomOptionModel.Balcony) { roomOptions.Add("Balkon"); } if (roomOptionModel.ChildBed) { roomOptions.Add("Łóżko dziecięce"); } if (roomOptionModel.WiFi) { roomOptions.Add("WiFi"); } return(roomOptions); }
public RoomOptionModel GetRoomOptionByRoomId(int roomId) { DataAccess.Entities.RoomOption roomOption = _roomOptionDao.GetRoomOptionByRoomId(roomId); var roomOptionModel = new RoomOptionModel { AirConditioning = roomOption.AirConditioning, Balcony = roomOption.Balcony, ChildBed = roomOption.ChildBed, OnePersonBed = roomOption.OnePersonBed, RoomId = roomOption.RoomId, TwoPersonBed = roomOption.TwoPersonBed, WiFi = roomOption.WiFi, }; return(roomOptionModel); }
public RoomModel GetRoomModelByRoomName(string roomName) { DataAccess.Entities.Room room = _roomDao.GetRoomByRoomName(roomName); RoomOptionModel roomOptionModel = _roomOptionService.GetRoomOptionByRoomId(room.Id); var roomModel = new RoomModel { Id = room.Id, MaxPerson = room.MaxPerson, Name = room.Name, Number = room.Number, Price = room.Price, RoomOptionModel = roomOptionModel }; return(roomModel); }