private void btnNuevo_Click(object sender, EventArgs e) { try { Libros libro = new Libros() { Id = Convert.ToInt32(txtCodigo.Text), Titulo = txtNombre.Text, anno = Convert.ToInt32(mskAnno.Text), Editorial = (Editorial)cbmEditoriales.SelectedItem }; Logica.Insertar(libro); } catch (Exception) { throw; } finally { Refrescar(); } }