////////////////////////////////////////////////////////////////////// public override CResultAErreur VerifieDonnees(CObjetDonnee objet) { CResultAErreur result = CResultAErreur.True; try { CExceptionTypePourTypeEO exception = (CExceptionTypePourTypeEO)objet; if (exception.TypeEntiteOrganisationnelle == null) { result.EmpileErreur(I.T("Exception must be linked to an Organizational Entity Type|10010")); } if (exception.TypeEntiteOrganisationnelle != null && exception.TypeElement == null) { result.EmpileErreur(I.T("Exception for OE Type @1 must be related to an Element Type|10009", exception.TypeEntiteOrganisationnelle.Libelle)); } return(result); } catch (Exception e) { result.EmpileErreur(new CErreurException(e)); } return(result); }
public void AddExceptionForType(Type tp) { if (tp == null) { return; } if (!HasExceptionForType(tp)) { CExceptionTypePourTypeEO nouvelleException = new CExceptionTypePourTypeEO(this.ContexteDonnee); nouvelleException.CreateNewInCurrentContexte(); nouvelleException.TypeEntiteOrganisationnelle = this; nouvelleException.TypeElement = tp; } }