private void boton_Agregar_Click(object sender, EventArgs e) { if (cliente.validar_Cliente(this.Controls) == Validar.estado_validacion.correcta) { DataTable tabla = new DataTable(); tabla = this.cliente.buscar_cliente(this.cmb_tipoDoc.SelectedValue.ToString(), txt_NumDoc.Text.Trim()); if (tabla.Rows.Count == 0) { if (cliente.agregar_cliente(this.Controls) == true) { MessageBox.Show("Cliente agregado correctamente", "Mensaje" , MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } } else { MessageBox.Show("El Cliente ya se encuentra en el sistema", "Mensaje" , MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } } }