private void AddGridFilterConditions(FilterElement filterElement, Transaction trn, TransactionLevel level) { // Currently only the description attribute is added. if (level.DescriptionAttribute != null) AddFilterCondition(filterElement, level.DescriptionAttribute.Attribute); foreach (SettingsDefaultFilterElement filter in settings.DefaultFilters.DefaultFilters) { bool roda = false; if (filter.Selection) { if (filterElement.Parent is SelectionElement) { roda = true; } } if (filter.Prompt) { if (filterElement.Parent is PromptElement) { roda = true; } } if (roda) { if (filter.Attribute != null) { if (trn.Structure.Root.ContainsAttribute(filter.Attribute, false)) { if (!String.IsNullOrEmpty(filter.Value)) { filterElement.AddCondition(filter.Value); } } } } } }
private void AddFilterCondition(FilterElement filterElement, Gx.Attribute att) { string conditionText = getCondition(att, filterElement.Instance.Settings); ConditionElement conditionElement = filterElement.AddCondition(conditionText); }