private void cmdGuardarIncidente_Click(object sender, EventArgs e) { try { service.RegisterIncident(txtDescription.Text, DateTime.Today, Convert.ToInt32(service.GetLastRental())); MessageBox.Show(this, "El incidente ha sido enviado exitosamente", "", MessageBoxButtons.OK, MessageBoxIcon.Information); this.Hide(); } catch (ServiceException serviceException) { MessageBox.Show(this, serviceException.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }