示例#1
0
        /// <summary>
        /// Return a object with the total of room and total of person of a hotel
        /// </summary>
        public static HotelCapacity GetCapacity(int idHotel)
        {
            HotelCapacity hotelCapacity = new HotelCapacity();
            int           place         = 0;

            List <Room> rooms = RoomDB.GetRoomsByHotel(idHotel);

            foreach (Room room in rooms)
            {
                place += room.Type;
            }

            hotelCapacity.TotalNumberRoom   = rooms.Count();
            hotelCapacity.TotalNumberPerson = place;


            return(hotelCapacity);
        }