private void btnVender_Click(object sender, EventArgs e) { string nombre = txtNomPasajero.Text; if (validaTextBoxVacio(nombre)) { byte asiento = Convert.ToByte(numUpAsiento.Value); if (validaAsiento(asiento)) { int clave = Convert.ToInt32(txtNumBoleto.Text); Destino dest = (Destino)cmbDestinos.SelectedItem; string pas = txtNomPasajero.Text; string tip = obtieneTipo(); adminBol.registraBoleto(clave, dest, pas, asiento, tip); } limpiar(); } else { MessageBox.Show("No debe quedar el nombre vacío", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }