// on clicking search it will show you avalible rooms for the selected dates and guest #
        private void btnSearch_Click(object sender, EventArgs e)
        {
            AvailableForm  = new AvailableRooms();
            AvailableForm.Show();
            AvailableForm.RoomsAvailable = RoomAvailableCalls.Add(dateTimePickerCheckIn.Value.Date, dateTimePickerCheckOut.Value.Date);
            AvailableForm.RoomCost = RoomAvailableCalls.RoomDetails(numericUpDownGuests.Text, dateTimePickerCheckOut.Value.Date, dateTimePickerCheckIn.Value.Date);

            AvailableForm.BookedFrom = dateTimePickerCheckIn.Value.Date;
            AvailableForm.BookedTo = dateTimePickerCheckOut.Value.Date;
            AvailableForm.Guests = numericUpDownGuests.Text;
            AvailableForm.GetFreeRooms();
        }
示例#2
0
        private void btnSearch_Click(object sender, EventArgs e)// on clicking search it will show you avalible rooms for the selected dates and guest #
        {
            AvailableForm = new AvailableRooms();
            AvailableForm.Show();
            AvailableForm.RoomsAvailable = RoomAvailableCalls.Add(dateTimePickerCheckIn.Value.Date, dateTimePickerCheckOut.Value.Date);
            AvailableForm.RoomCost       = RoomAvailableCalls.RoomDetails(numericUpDownGuests.Text, dateTimePickerCheckOut.Value.Date, dateTimePickerCheckIn.Value.Date);

            AvailableForm.BookedFrom = dateTimePickerCheckIn.Value.Date;
            AvailableForm.BookedTo   = dateTimePickerCheckOut.Value.Date;
            AvailableForm.Guests     = numericUpDownGuests.Text;
            AvailableForm.GetFreeRooms();
        }