//------------------------------------------ public void FillFromTable(CODEQBase objetDeRequete) { CEasyQuery query = objetDeRequete.Query; if (query == null) { return; } IdObjetDeQuerySource = objetDeRequete.Id; HashSet <string> champsASupprimer = new HashSet <string>(); foreach (IChampEntiteSNMP champ in Champs.ToArray()) { if (champ is CChampEntiteSnmpStandard) { champsASupprimer.Add(champ.Id); } } foreach (IColumnDeEasyQuery col in objetDeRequete.Columns) { CChampEntiteFromQuery champ = Champs.FirstOrDefault(c => c is CChampEntiteFromQuery && ((CChampEntiteFromQuery)c).ColonneSource.Id == col.Id) as CChampEntiteFromQuery; if (champ == null) { champ = new CChampEntiteFromQuery(); ChampsListe.Add(champ); } champ.InitFromColonneSource(col, objetDeRequete); } }
//------------------------------------------ public bool AddChamp(IChampEntiteSNMP champ) { if (Champs.FirstOrDefault(c => c.NomChamp.ToUpper() == champ.NomChamp.ToUpper()) == null) { ChampsListe.Add(champ); return(true); } return(false); }