Ejemplo n.º 1
0
        public override XDocument ConvertToServerXml(List <Table> table_list)
        {
            {
                Table table = table_list[0];
                List <List <object> > item_list = table.itemList;
                for (int i = 0; i < item_list.Count; ++i)
                {
                    List <object> val_list = item_list[i];
                    for (int j = 0; j < val_list.Count; j++)
                    {
                        if (string.IsNullOrEmpty(val_list[j].ToString()))
                        {
                            val_list[j] = 0;
                        }
                    }
                }
            }

            XDocument xmldoc    = new XDocument();
            XElement  root_node = new XElement("config");

            xmldoc.Add(root_node);

            foreach (Table table in table_list)
            {
                XElement node = XmlBuilder.ConvertTableToXmlElement(table);
                if (null != node)
                {
                    root_node.Add(node);
                }
            }

            return(xmldoc);
        }
Ejemplo n.º 2
0
        public virtual XDocument ConvertToServerXml(List <Table> table_list)
        {
            XDocument xmldoc    = new XDocument();
            XElement  root_node = new XElement("config");

            xmldoc.Add(root_node);

            foreach (Table table in table_list)
            {
                XElement node = XmlBuilder.ConvertTableToXmlElement(table);
                if (null != node)
                {
                    root_node.Add(node);
                }
            }

            return(xmldoc);
        }