//------------------------------------------------------------------- public void AssocieDocument(CDocumentGED document) { CRelationDocumentGED_Categorie relation = new CRelationDocumentGED_Categorie(document.ContexteDonnee); CFiltreData filtre = new CFiltreData(CDocumentGED.c_champId + "=@1 and " + c_champId + "=@2", document.Id, Id); if (relation.ReadIfExists(filtre)) { return; } relation.CreateNewInCurrentContexte(); relation.Categorie = this; relation.Document = document; }
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; } }