private void viewReviewsButton_Click(object sender, EventArgs e) { ReviewsPanel reviewsPanel = new ReviewsPanel(hotel); this.Hide(); reviewsPanel.Show(); }
private void addReviewButton_Click(object sender, EventArgs e) { if (ValidateText(reviewTextBox)) { Review review = new Review { Guest = hotel.Guests.Last(), Text = reviewTextBox.Text }; hotel.AddReview(review); hotel.Save(); ReviewsPanel reviewsPanel = new ReviewsPanel(hotel); this.Hide(); reviewsPanel.Show(); } else { reviewTextBox.Clear(); } }