private void buttonBook_Click(object sender, EventArgs e) { string firstName = textBoxFirstName.Text; string lastName = textBoxLastName.Text; string phoneNumber = textBoxPhoneNumber.Text; int ticketAmount = int.Parse(comboBoxTickets.Text); if (festivalHandler.CheckIfCustomerExists(phoneNumber) == false) { customer = festivalHandler.GetNewCustomer(firstName, lastName, phoneNumber, ticketAmount, theater); buttonBook.Enabled = false; OpenChildForm(new SuccesfulBookingForm()); } else { textBoxFirstName.Text = ""; textBoxLastName.Text = ""; textBoxPhoneNumber.Text = ""; checkBoxNo.Checked = false; labelSelectTime.Visible = false; comboBoxSelectTime.Visible = false; pictureBoxFirstName.Visible = false; pictureBoxLastName.Visible = false; pictureBoxPhoneNumber.Visible = false; pictureBoxTickets.Visible = false; labelTicketsLeft.Visible = false; labelAmount.Visible = false; labelTheaterNumber.Visible = false; labelTheaterTitle.Visible = false; labelFirstName.Visible = false; textBoxFirstName.Visible = false; labelLastName.Visible = false; textBoxLastName.Visible = false; labelPhoneNumber.Visible = false; textBoxPhoneNumber.Visible = false; buttonBook.Visible = false; labelWheelChair.Visible = false; checkBoxYes.Visible = false; checkBoxNo.Visible = false; labelEnterInfo.Visible = false; labelErrorMessage.Visible = true; labelErrorMessage.Text = "You have previously booked tickets!\nCancel the tickets\nor try again..."; buttonTryAgain.Visible = true; } }