// this method is used to get get the total room price when a customer types in a room number in the ChooseRoomNumber textbox
        protected void ChooseRoomNumber_TextChanged(object sender, EventArgs e)
        {
            DateTime checkInDate  = DateTime.Parse(checkInBox.Text);
            DateTime checkOutDate = DateTime.Parse(checkOutBox.Text);
            int      roomNumber   = int.Parse(this.ChooseRoomNumber.Text);
            decimal  totalPrice   = HotelManager.CalculatePriceWithTenPercentageDiscount(roomNumber, checkInDate, checkOutDate);

            TotalRoomPrice.Text = totalPrice.ToString();
        }
        // this method creates a customer based on the information from website
        protected void ConfirmCustomerButton_Click(object sender, EventArgs e)
        {
            string custFName    = fNameBox.Text;
            string custLName    = lNameBox.Text;
            int    custZipcode  = int.Parse(zipcodeBox.Text);
            string custAddress  = addressBox.Text;
            string custPhoneNum = phoneNumberBox.Text;
            string custEmail    = emailBox.Text;

            HotelManager.CreateCustomer(custFName, custLName, custZipcode, custAddress, custPhoneNum, custEmail);
        }
        // thjis method is used to create the reservation
        protected void confirmReservationButton_Click(object sender, EventArgs e)
        {
            string   phoneNum     = phoneNumberBox.Text;
            int      roomNumber   = int.Parse(this.ChooseRoomNumber.Text);
            DateTime checkInDate  = DateTime.Parse(checkInBox.Text);
            DateTime checkOutDate = DateTime.Parse(checkOutBox.Text);

            HotelManager.CreateReservation(phoneNum, roomNumber, checkInDate, checkOutDate);

            ResetWebPage();
        }
        // this method is used to search for a room based on feature number and check in and out date
        protected void searchRoom_Click(object sender, EventArgs e)
        {
            DateTime checkInDate   = DateTime.Parse(checkInBox.Text);
            DateTime checkOutDate  = DateTime.Parse(checkOutBox.Text);
            int      featureNumber = SelectFeatures();

            List <Room> rooms = HotelManager.GetRoomsAvailableBasedOnFeatures(checkInDate, checkOutDate, featureNumber);

            ListOfRooms.DataSource    = rooms;
            ListOfRooms.DataTextField = "roomNum";
            DataBind();
            ListOfRooms.Visible = true;
        }
        // this method gets feature prices from Database
        protected void LoadFeaturePrices()
        {
            List <Features> features = HotelManager.GetFeaturePrice();

            foreach (Features feature in features)
            {
                if (feature.featureDescription == "balcony")
                {
                    balconyPriceLabel.Text = feature.FeaturePrice.ToString();
                }

                if (feature.featureDescription == "double bed")
                {
                    doubleBedPriceLabel.Text = feature.FeaturePrice.ToString();
                }

                if (feature.featureDescription == "bathtub")
                {
                    bathtopPriceLabel.Text = feature.FeaturePrice.ToString();
                }

                if (feature.featureDescription == "jacuzzi")
                {
                    jacuzziPriceLabel.Text = feature.FeaturePrice.ToString();
                }

                if (feature.featureDescription == "kitchen")
                {
                    kitchenPriceLabel.Text = feature.FeaturePrice.ToString();
                }

                if (feature.featureDescription == "single bed")
                {
                    oneSingleBedsLabel.Text = feature.FeaturePrice.ToString();
                }

                if (feature.featureDescription == "2 single beds")
                {
                    twoSingleBedsLabel.Text = feature.FeaturePrice.ToString();
                }
            }
        }