private void com_langue_search_SelectedIndexChanged(object sender, EventArgs e) { int idx = com_langue.FindStringExact(com_langue_search.Items[com_langue_search.SelectedIndex].ToString(), 0); ParametreRequete p = new ParametreRequete("y.langue", "langue", null, "=", "AND"); if (idx > -1) { Langue l = com_langue.Items[idx] as Langue; p = new ParametreRequete("y.langue", "langue", l.Id, "=", "AND"); } dao.AddParamToFind(p); LoadAll(true, true); }
private void txt_num_search_TextChanged(object sender, EventArgs e) { ParametreRequete p = new ParametreRequete("y.code", "code", null, "LIKE", "AND"); String num = txt_num_search.Text; if (num != null ? num.Trim().Length > 0 : false) { p = new ParametreRequete(null, "code", num.ToUpper() + "%", "LIKE", "AND"); p.OtherExpression.Add(new ParametreRequete("UPPER(y.nom)", "nom", num.ToUpper() + "%", "LIKE", "OR")); p.OtherExpression.Add(new ParametreRequete("UPPER(y.francais.nom)", "nom", num.ToUpper() + "%", "LIKE", "OR")); } dao.AddParamToFind(p); LoadAll(true, true); }