Example #1
0
        public virtual List <XmlDocument> GetXmlFiltered(string filter, string attrentity)
        {
            ClearStatistics();

            if (!string.IsNullOrEmpty(filter) && filter.StartsWith("pkg"))
            {
                var items = GetListTFromFunction(filter);
                return(XmlDocumentConverter.ConvertFromListOf(items));
            }

            var attr = XmlDocumentConverter.XmlDocFromString(attrentity);

            return(XmlGetList(attr, filter));
        }
Example #2
0
        protected XmlDocument EntityListResult <TEnt>(IEnumerable <TEnt> objList)
            where TEnt : WMSBusinessObject, new()
        {
            // TODO: Delegate to serialization to XmlMediaTypeFormatter
            var xmlList          = XmlDocumentConverter.ConvertFromListOf(objList);
            var resultXmlDocList = new XmlDocument();

            resultXmlDocList.LoadXml("<ITEMS></ITEMS>");
            var root = resultXmlDocList.DocumentElement;

            if (root != null)
            {
                foreach (var doc in xmlList)
                {
                    if (doc.DocumentElement != null)
                    {
                        root.InnerXml += doc.InnerXml;
                    }
                }
            }
            return(resultXmlDocList);
        }