internal static void ObjectsWithVarNotBasedOnAtt(List <KBObject> objs, IOutputService output) { foreach (KBObject obj in objs) { string vnames = ""; Boolean hasErrors = false; Boolean SaveObj = false; if (isGenerated(obj) && (obj is Transaction || obj is WebPanel || obj is WorkPanel || obj is Procedure)) { string pic2 = (string)obj.GetPropertyValue("ATT_PICTURE"); VariablesPart vp = obj.Parts.Get <VariablesPart>(); if (vp != null) { foreach (Variable v in vp.Variables) { if ((!v.IsStandard) && Utility.VarHasToBeInDomain(v)) { string attname = (v.AttributeBasedOn == null) ? "" : v.AttributeBasedOn.Name; string domname = (v.DomainBasedOn == null) ? "" : v.DomainBasedOn.Name; if (attname == "" && domname == "") { string vname = v.Name.ToLower(); vnames += vname + " "; hasErrors = true; } } } } if (hasErrors) { OutputError err = new OutputError("Variables not based in attributes or domain: " + vnames, MessageLevel.Error, new KBObjectPosition(vp)); output.Add("KBDoctor", err); } } } }