AerolineaFrba.Abm_Ruta.Baja.concatenarCriterio C# (CSharp) Method

concatenarCriterio() private method

private concatenarCriterio ( TextBox txt, ComboBox combo, string criterio ) : Boolean
txt TextBox
combo ComboBox
criterio string
return Boolean
        private Boolean concatenarCriterio(TextBox txt, ComboBox combo, string criterio)
        {
            if (this.datosCorrectos(txt, combo))
            {

                this.query += " AND ";

                string campo = this.buscarNombreCampo(combo.Text);

                this.query += campo + criterio;

                string mensaje = "'" + txt.Text + "'" + " sobre el campo " + combo.Text;

                if (this.filtro == 1)
                {
                    listaFiltros.Items.Add("Se ha agregado el filtro por contenido del valor ");
                }
                else
                {
                    listaFiltros.Items.Add("Se ha agregado el filtro por igualdad del valor ");
                }
                listaFiltros.Items.Add(mensaje);
                return true;
            }
            return false;
        }