private void btnReservationRegister_Click(object sender, EventArgs e) { Reservation reservation = CreateReservation(); if (btnReservationRegister.Text == "Cadastrar") { Response response = _reservationBLL.Register(reservation); MessageBox.Show(response.Message); if (response.Success) { this.ClearForm(); ClearData(); } } else if (btnReservationRegister.Text == "Editar") { reservation.ID = _reservation.ID; Response response = _reservationBLL.Update(reservation); MessageBox.Show(response.Message); if (response.Success) { this.ClearForm(); ClearData(); btnReservationRegister.Text = "Cadastrar"; btnDelete.Visible = false; } } }