private void button3_Click(object sender, EventArgs e)
{
if (this.datosCorrectos())
{
bool huboCondicion = false;
string queryselect = QUERY_BASE;
if (!this.sePusoFiltro())
{
return;
}
queryselect = queryselect + " WHERE ";
if (!Validacion.esVacio(txtFiltro1))
{
string condicion = "CIU_DESC" + " LIKE '%" + txtFiltro1.Text + "%'";
this.generarQuery(ref huboCondicion, ref queryselect, condicion);
}
if (!Validacion.esVacio(txtFiltro2))
{
string condicion = "CIU_DESC LIKE '_" + txtFiltro2.Text + "'";
this.generarQuery(ref huboCondicion, ref queryselect, condicion);
}
this.ejecutarConsulta(queryselect);
if (dg.Rows.Count == 0)
{
MessageBox.Show("No se han encontrado resultados en la consulta", "Informe", MessageBoxButtons.OK);
}
}
}