public CDefinitionProprieteDynamique[] GetProprietesInstance() { List <CDefinitionProprieteDynamique> lst = new List <CDefinitionProprieteDynamique>(); foreach (CVariableDynamique variable in ListeVariables) { bool bHasSubs = !variable.TypeDonnee.IsArrayOfTypeNatif && CFournisseurGeneriqueProprietesDynamiques.HasSubProperties(variable.TypeDonnee.TypeDotNetNatif); CDefinitionProprieteDynamique def = new CDefinitionProprieteDynamiqueVariableDynamique(variable, bHasSubs); def.Rubrique = I.T("Export structure|182"); lst.Add(def); } return(lst.ToArray()); }
/// ////////////////////////////////////////////////// public override CResultAErreur VerifieIntegrite(CFiltreDynamique filtre) { CResultAErreur result = CResultAErreur.True; if (m_champ == null) { result.EmpileErreur(I.T("Field not defined|144")); } if (m_strIdOperateur == null) { result.EmpileErreur(I.T("Operator not defined|158")); } if (m_champValeur is CDefinitionProprieteDynamiqueChampCustom && m_champ is CDefinitionProprieteDynamiqueChampCustom) { result.EmpileErreur(I.T("Test function not supported : Custom field = Custom field|159")); return(result); } if (ExpressionValeur == null && m_champValeur == null) { result.EmpileErreur(I.T("Value formula is incorrect|145")); } else if (ExpressionValeur != null) { ArrayList lstChamps = ExpressionValeur.ExtractExpressionsType(typeof(C2iExpressionChamp)); foreach (C2iExpressionChamp expChamp in lstChamps) { CDefinitionProprieteDynamique def = expChamp.DefinitionPropriete; if (def == null) { result.EmpileErreur(I.T("Null field in value formula|160")); } else { if (def is CDefinitionProprieteDynamiqueVariableDynamique) { CDefinitionProprieteDynamiqueVariableDynamique defVar = (CDefinitionProprieteDynamiqueVariableDynamique)def; CVariableDynamique variable = filtre.GetVariable(defVar.IdChamp); if (variable == null) { result.EmpileErreur(I.T("The variable @1 doesn't exist|147", defVar.Nom)); } } } } } return(result); }
public CDefinitionProprieteDynamique[] GetProprietesInstance() { List <CDefinitionProprieteDynamique> lst = new List <CDefinitionProprieteDynamique>(); foreach (CVariableDynamique variable in ListeVariables) { bool bHasSubs = CFournisseurGeneriqueProprietesDynamiques.HasSubProperties(variable.TypeDonnee.TypeDotNetNatif); CDefinitionProprieteDynamique def = new CDefinitionProprieteDynamiqueVariableDynamique(variable, bHasSubs); if (def != null) { lst.Add(def); } } return(lst.ToArray()); }
/// ////////////////////////////////////////////////// protected void OnChangeVariable(CFiltreDynamique filtre, C2iExpression expression, CVariableDynamique variable) { if (expression == null) { return; } foreach (C2iExpressionChamp exp in expression.ExtractExpressionsType(typeof(C2iExpressionChamp))) { if (exp.DefinitionPropriete is CDefinitionProprieteDynamiqueVariableDynamique) { CDefinitionProprieteDynamiqueVariableDynamique def = (CDefinitionProprieteDynamiqueVariableDynamique)exp.DefinitionPropriete; if (def.IdChamp == variable.IdVariable) { def = new CDefinitionProprieteDynamiqueVariableDynamique(variable); exp.DefinitionPropriete = def; } } } }
/// ////////////////////////////////////////////////// protected bool DoesExpressionUtiliseVariable(C2iExpression expression, CVariableDynamique variable) { if (expression == null) { return(false); } foreach (C2iExpressionChamp exp in expression.ExtractExpressionsType(typeof(C2iExpressionChamp))) { if (exp.DefinitionPropriete is CDefinitionProprieteDynamiqueVariableDynamique) { CDefinitionProprieteDynamiqueVariableDynamique def = (CDefinitionProprieteDynamiqueVariableDynamique)exp.DefinitionPropriete; if (def.IdChamp == variable.IdVariable) { return(true); } } } return(false); }