Пример #1
0
 public int CompareTo(RoomServer other)
 {
     if (RoomCount == other.RoomCount)
     {
         return(Id.CompareTo(other.Id));
     }
     return(RoomCount.CompareTo(other.RoomCount));
 }
Пример #2
0
        // GET: Rooms
        public async Task <IActionResult> Index(string searchString)
        {
            List <Room> myRooms = await _room.GetRooms(searchString);

            var rooms = new RoomCount()
            {
                Rooms = myRooms,
                Count = myRooms.Count()
            };

            return(View(rooms));
        }
Пример #3
0
        public RoomCount CreateRoomCount(Hotel hotel, Parameters parameters)
        {
            var roomCount = new RoomCount
            {
                HotelID       = hotel.HotelID,
                HotelName     = hotel.HotelName,
                HotelAddress  = hotel.HotelAddress,
                HotelCity     = hotel.City.CityName,
                HotelRegion   = hotel.City.Region.RegionName,
                HotelCountry  = hotel.City.Region.Country.CountryName,
                StandardRate  = (hotel.RoomTypes.ElementAt(0)).StandardRate,
                FreeRoomCount = CountRooms((hotel.RoomTypes.ElementAt(0)).RoomTypeID, parameters)
            };

            return(roomCount);
        }