예제 #1
0
        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() };
        }
예제 #2
0
        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()
            });
        }
예제 #3
0
 internal void SetSearchCriteria(SearchCriteriaSettings settings, bool doSearch)
 {
     this.subrecordPanel.SetSearchCriteria(settings, doSearch);
 }