Пример #1
0
        private void buttonAvailability_Click(object sender, EventArgs e)
        {
            this.assignParams();
            Boolean available = bh.checkAvailability(id_hotel, id_regimen, checkin, checkout, extraGuests, id_roomtype);

            if (available)
            {
                Generar_Modificar_Reserva.BookingConfirmation frm = new BookingConfirmation(this);
                frm.textBoxHotel.Text       = comboBoxHotel.Text;
                frm.textBoxRegimen.Text     = comboBoxRegimen.Text;
                frm.textBoxRoomType.Text    = comboBoxRoomType.Text;
                frm.textBoxExtraGuests.Text = Convert.ToString(extraGuests);
                frm.textBoxCheckIn.Text     = Convert.ToString(checkin);
                frm.textBoxCheckout.Text    = Convert.ToString(checkout);
                frm.setTotalPrice(id_hotel, id_regimen, checkin, checkout, extraGuests, id_roomtype);
                frm.setValues(id_hotel, id_regimen, checkin, checkout, extraGuests, id_roomtype);
                if (updating)
                {
                    frm.setUpdating();
                }
                frm.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("There is no availability for Hotel on this period for the regimen and roomtype selected. Try some other period or regimen or roomtype");
            }
        }
Пример #2
0
        private void buttonAvailability_Click(object sender, EventArgs e)
        {
            this.assignParams();
            Boolean available = bh.checkAvailability(id_hotel, id_regimen, checkin, checkout, extraGuests, id_roomtype);
            if (available)
            {
                Generar_Modificar_Reserva.BookingConfirmation frm = new BookingConfirmation(this);
                frm.textBoxHotel.Text = comboBoxHotel.Text;
                frm.textBoxRegimen.Text = comboBoxRegimen.Text;
                frm.textBoxRoomType.Text = comboBoxRoomType.Text;
                frm.textBoxExtraGuests.Text = Convert.ToString(extraGuests);
                frm.textBoxCheckIn.Text = Convert.ToString(checkin);
                frm.textBoxCheckout.Text = Convert.ToString(checkout);
                frm.setTotalPrice(id_hotel, id_regimen, checkin, checkout, extraGuests, id_roomtype);
                frm.setValues(id_hotel, id_regimen, checkin, checkout, extraGuests, id_roomtype);
                if (updating) {
                    frm.setUpdating();
                }
                frm.Show();
                this.Hide();

            }
            else {
                MessageBox.Show("There is no availability for Hotel on this period for the regimen and roomtype selected. Try some other period or regimen or roomtype");
            }
        }