internal static SearchCriteriaXmlSettings ToXml(SearchCriteriaSettings setting) { var criteria = new ArrayList(); foreach (var child in setting.Items.OfType<SearchSubrecord>().Where(x => x.Checked)) { criteria.Add(new SearchSubrecordXml { SubRecord = child.Record.name, Type = child.Type }); } foreach (var elem in setting.Items.OfType<SearchElement>().Where(x => x.Checked)) { var par = elem.Parent; criteria.Add(new SearchElementXml { SubRecord = par.Record.name, Element = elem.Record.name, Type = elem.Type, Value = elem.Value != null ? elem.Value.ToString() : null }); } return new SearchCriteriaXmlSettings { Name = setting.ToString(), Type = setting.Type, Items = criteria.ToArray() }; }
public static SearchCriteriaXmlSettings ToXml(SearchCriteriaSettings setting) { var criteria = new ArrayList(); foreach (var child in setting.Items.OfType <SearchSubrecord>().Where(x => x.Checked)) { criteria.Add(new SearchSubrecordXml { SubRecord = child.Record.name, Type = child.Type }); } foreach (var elem in setting.Items.OfType <SearchElement>().Where(x => x.Checked)) { var par = elem.Parent; criteria.Add(new SearchElementXml { SubRecord = par.Record.name, Element = elem.Record.name, Type = elem.Type, Value = elem.Value != null ? elem.Value.ToString() : null }); } return(new SearchCriteriaXmlSettings { Name = setting.ToString(), Type = setting.Type, Items = criteria.ToArray() }); }
internal void SetSearchCriteria(SearchCriteriaSettings settings, bool doSearch) { this.subrecordPanel.SetSearchCriteria(settings, doSearch); }