/// ////// public void Init(CObjetDonneeAIdNumerique[] elements) { m_elementsAAgenda = elements; if (elements.Length == 0) { m_filtrePrincipal = new CFiltreDataImpossible(); } else { //Type->id à voir Hashtable tableTypeToIds = new Hashtable(); Type tp = m_elementsAAgenda[0].GetType(); foreach (CObjetDonneeAIdNumerique objet in m_elementsAAgenda) { AddElementAVoir(objet, tableTypeToIds); if (objet is IElementAAgenda) { foreach (string strProp in ((IElementAAgenda)objet).GetProprietesAccessSousElementsAgenda()) { ArrayList lst = CInterpreteurTextePropriete.CreateListePlateFrom(objet, strProp); foreach (CObjetDonneeAIdNumerique objFils in lst) { AddElementAVoir(objFils, tableTypeToIds); } } } } m_filtrePrincipal = new CFiltreData( ); string strFiltre = ""; int nVariable = 1; foreach (DictionaryEntry dic in tableTypeToIds) { if (strFiltre != "") { strFiltre += " or "; } strFiltre += "(" + CRelationEntreeAgenda_ElementAAgenda.c_champTypeElementAAgenda + "=@" + nVariable.ToString() + " and " + CRelationEntreeAgenda_ElementAAgenda.c_champIdElementAAgenda + " in (" + dic.Value.ToString() + "))"; m_filtrePrincipal.Parametres.Add(dic.Key.ToString()); nVariable++; } m_filtrePrincipal.Filtre = strFiltre; } }