예제 #1
0
        public static List <HotelRoomType> GetAviableRoomTypes(string dateOfArrival, string dateOfDeparture, int numberOfAdults, int numberOfChildren)
        {
            List <string>    dates        = GetIntermediateDates(dateOfArrival, dateOfDeparture);
            List <HotelRoom> hotelRooms   = GetAviableRooms(dates);
            List <long>      hotelRoomIds = GetHotelRoomTypeIds(hotelRooms);

            return(ServicesHotelRoomType.GetHotelRoomTypes(numberOfAdults, numberOfChildren)
                   .Where(t => hotelRoomIds.Contains(t.Id))
                   .ToList());
        }
예제 #2
0
        public override async void OnStateChange(Chat chat)
        {
            List <HotelRoomType> listRoomTypes = ServicesHotelRoomType.GetHotelRoomTypes();

            if (listRoomTypes.Count == 0)
            {
                await ServicesMessageController.SendMessageAsync(chat, "Номерів немає", Keyboards.ReturnMainMenu);

                return;
            }

            IReplyMarkup markup = Keyboards.GetRoomTypesMenu(listRoomTypes);
            await ServicesMessageController.SendMessageAsync(chat, "Оберіть тип номеру", markup);
        }