//------------------------------------------------------- private void AddCategory(CCategorieGED cat, HashSet <int> setCats) { setCats.Add(cat.Id); if (IncludeSubCategories) { foreach (CCategorieGED subCat in cat.CategoriesFilles) { AddCategory(subCat, setCats); } } }
public bool IsInCategory(CCategorieGED category) { if (category == null) { return(false); } CListeObjetsDonnees lstCats = RelationsCategories; lstCats.Filtre = new CFiltreData(CCategorieGED.c_champId + "=@1", category.Id); return(lstCats.Count != 0); }
public void RemoveCategory(CCategorieGED category) { if (category == null) { return; } CListeObjetsDonnees lstCats = RelationsCategories; lstCats.Filtre = new CFiltreData(CCategorieGED.c_champId + "=@1", category.Id); if (lstCats.Count > 0) { CObjetDonneeAIdNumerique.Delete(lstCats, true); } }
public void AddCategory(CCategorieGED category) { if (category == null) { return; } CListeObjetsDonnees lstCats = RelationsCategories; lstCats.Filtre = new CFiltreData(CCategorieGED.c_champId + "=@1", category.Id); if (lstCats.Count == 0) { CRelationDocumentGED_Categorie rel = new CRelationDocumentGED_Categorie(ContexteDonnee); rel.CreateNewInCurrentContexte(); rel.Document = this; rel.Categorie = category; } }