private void btnBookRoom_Click(object sender, EventArgs e)
        {
            string cartType      = txtCardType.Text;
            string guestAccount  = txtGuestAccount.Text;
            string guestName     = txtGuestName.Text;
            string guestPassport = txtGuestPassport.Text;
            int    duration      = (int)nudDuration.Value;
            int    numberOfGuest = (int)nudGuestNumber.Value;
            string roomNo        = (string)dgvRoomDetails["roomNo", dgvRoomDetails.CurrentRow.Index].Value;

            if (_hotelBooking.checkRoomAvailability(roomNo, dtpStartDate.Value.ToString(), duration))
            {
                MessageBox.Show("Room Available...");

                MessageBox.Show(_hotelBooking.makeRoomReservation(cartType, guestAccount, guestName, guestPassport, duration, numberOfGuest, roomNo, dtpStartDate.Value.ToString(), ""));
            }
            else
            {
                MessageBox.Show("Room Unavailable..");
            }
        }
        private void btnBookRoom_Click(object sender, EventArgs e)
        {
            if (_dictPassengers.Count > 0)
            {
                Package packageInfo = (Package)cmbPackage.SelectedItem;

                string   from = packageInfo.From;
                string   to   = packageInfo.To;
                DateTime flightDepartureDate = (DateTime)dgvFlightInformation["DepartureTime", dgvFlightInformation.CurrentRow.Index].Value;
                DateTime end = flightDepartureDate.AddDays(packageInfo.Duration);

                PassengerInfo[] passengers = new PassengerInfo[_dictPassengers.Count];
                int             i          = 0;
                Dictionary <string, PassengerInfo> .Enumerator enumerator = _dictPassengers.GetEnumerator();
                while (enumerator.MoveNext())
                {
                    passengers[i++] = enumerator.Current.Value;
                }


                PaymentInfo payment = new PaymentInfo();
                payment.cardholdername = txtHolderName.Text;
                payment.cardname       = txtCardName.Text;
                payment.cv2            = txtCardPin.Text;
                payment.expiryDate     = dtpCardExpiry.Value;

                FBooking.FlightBookingServiceClient flightBooking = new FlightBookingServiceClient();

                using (TransactionScope ts = new TransactionScope())
                {
                    try
                    {
                        if (flightBooking.checkAvailability(from, to, flightDepartureDate, passengers.Length))
                        {
                            MessageBox.Show("Flight Seats Available...");

                            if (flightBooking.makeReservation(from, to, flightDepartureDate, passengers, payment))
                            {
                                MessageBox.Show("Flight Reservation Successful...");
                            }
                            else
                            {
                                throw new Exception("Flight Reservation unsuccessful...");
                            }
                        }
                        else
                        {
                            throw new Exception("Seats Unavailable...");
                        }

                        string cartType      = txtCardType.Text;
                        string guestAccount  = txtGuestAccount.Text;
                        string guestName     = txtGuestName.Text;
                        string guestPassport = txtGuestPassport.Text;
                        int    duration      = packageInfo.Duration;
                        int    numberOfGuest = _dictPassengers.Count;
                        string roomNo        = (string)dgvRoomDetails["roomNo", dgvRoomDetails.CurrentRow.Index].Value;
                        if (_hotelBooking.checkRoomAvailability(roomNo, dtpStartDate.Value.ToString(), duration))
                        {
                            MessageBox.Show("Hotel Room Available...");

                            MessageBox.Show(_hotelBooking.makeRoomReservation(cartType, guestAccount, guestName, guestPassport, duration, numberOfGuest, roomNo, dtpStartDate.Value.ToString(), ""));
                        }
                        else
                        {
                            throw new Exception("Hotel Room Unavailable..");
                        }

                        ts.Complete();
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.Message);
                        return;
                    }
                }
            }
        }