private void BtnAgregar_Click(object sender, EventArgs e) { try { if (txtNombre.Text == "" || txtCarrera.Text == "") { MessageBox.Show("No puede ingresar carreras, aún faltan datos por completar", "Datos incompletos", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } else { _CN_Especialidades.Agregarespecialidades(txtNombre.Text, txtCarrera.Text); MostrarEspecialidades(); } } catch (Exception ex) { MessageBox.Show("Ha ocurrido un error" + ex, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void BtnAgregar_Click(object sender, EventArgs e) { _CN_Especialidades.Agregarespecialidades(txtNombre.Text, txtCarrera.Text); MostrarEspecialidades(); }