private void btnAdd_Click(object sender, EventArgs e) { bool entrada; if (radioButton1.Checked) { entrada = true; } else { entrada = false; } try { RegistroDAO.AgregarRegistro(new Registro(entrada, dateTimePicker1.Value, (int)numericUpDown1.Value, cmbId.Text)); MessageBox.Show("Registration succeed!"); Actualizaciones.Invoke(); } catch (Exception exception) { MessageBox.Show(exception.Message); } }