public static CT_TableColumns Parse(XmlNode node, XmlNamespaceManager namespaceManager) { if (node == null) { return(null); } CT_TableColumns ctObj = new CT_TableColumns(); if (node.Attributes["count"] != null) { ctObj.count = XmlHelper.ReadUInt(node.Attributes["count"]); } ctObj.tableColumn = new List <CT_TableColumn>(); foreach (XmlNode childNode in node.ChildNodes) { if (childNode.LocalName == "tableColumn") { ctObj.tableColumn.Add(CT_TableColumn.Parse(childNode, namespaceManager)); } } return(ctObj); }
public static CT_Table Parse(XmlNode node, XmlNamespaceManager namespaceManager) { if (node == null) { return(null); } CT_Table ctObj = new CT_Table(); if (node.Attributes["id"] != null) { ctObj.id = XmlHelper.ReadUInt(node.Attributes["id"]); } ctObj.name = XmlHelper.ReadString(node.Attributes["name"]); ctObj.displayName = XmlHelper.ReadString(node.Attributes["displayName"]); ctObj.comment = XmlHelper.ReadString(node.Attributes["comment"]); ctObj.@ref = XmlHelper.ReadString(node.Attributes["ref"]); if (node.Attributes["tableType"] != null) { ctObj.tableType = (ST_TableType)Enum.Parse(typeof(ST_TableType), node.Attributes["tableType"].Value); } if (node.Attributes["headerRowCount"] != null) { ctObj.headerRowCount = XmlHelper.ReadUInt(node.Attributes["headerRowCount"]); } if (node.Attributes["insertRow"] != null) { ctObj.insertRow = XmlHelper.ReadBool(node.Attributes["insertRow"]); } if (node.Attributes["insertRowShift"] != null) { ctObj.insertRowShift = XmlHelper.ReadBool(node.Attributes["insertRowShift"]); } if (node.Attributes["totalsRowCount"] != null) { ctObj.totalsRowCount = XmlHelper.ReadUInt(node.Attributes["totalsRowCount"]); } if (node.Attributes["totalsRowShown"] != null) { ctObj.totalsRowShown = XmlHelper.ReadBool(node.Attributes["totalsRowShown"]); } if (node.Attributes["published"] != null) { ctObj.published = XmlHelper.ReadBool(node.Attributes["published"]); } if (node.Attributes["headerRowDxfId"] != null) { ctObj.headerRowDxfId = XmlHelper.ReadUInt(node.Attributes["headerRowDxfId"]); } if (node.Attributes["dataDxfId"] != null) { ctObj.dataDxfId = XmlHelper.ReadUInt(node.Attributes["dataDxfId"]); } if (node.Attributes["totalsRowDxfId"] != null) { ctObj.totalsRowDxfId = XmlHelper.ReadUInt(node.Attributes["totalsRowDxfId"]); } if (node.Attributes["headerRowBorderDxfId"] != null) { ctObj.headerRowBorderDxfId = XmlHelper.ReadUInt(node.Attributes["headerRowBorderDxfId"]); } if (node.Attributes["tableBorderDxfId"] != null) { ctObj.tableBorderDxfId = XmlHelper.ReadUInt(node.Attributes["tableBorderDxfId"]); } if (node.Attributes["totalsRowBorderDxfId"] != null) { ctObj.totalsRowBorderDxfId = XmlHelper.ReadUInt(node.Attributes["totalsRowBorderDxfId"]); } ctObj.headerRowCellStyle = XmlHelper.ReadString(node.Attributes["headerRowCellStyle"]); ctObj.dataCellStyle = XmlHelper.ReadString(node.Attributes["dataCellStyle"]); ctObj.totalsRowCellStyle = XmlHelper.ReadString(node.Attributes["totalsRowCellStyle"]); if (node.Attributes["connectionId"] != null) { ctObj.connectionId = XmlHelper.ReadUInt(node.Attributes["connectionId"]); } foreach (XmlNode childNode in node.ChildNodes) { if (childNode.LocalName == "autoFilter") { ctObj.autoFilter = CT_AutoFilter.Parse(childNode, namespaceManager); } else if (childNode.LocalName == "sortState") { ctObj.sortState = CT_SortState.Parse(childNode, namespaceManager); } else if (childNode.LocalName == "tableColumns") { ctObj.tableColumns = CT_TableColumns.Parse(childNode, namespaceManager); } else if (childNode.LocalName == "tableStyleInfo") { ctObj.tableStyleInfo = CT_TableStyleInfo.Parse(childNode, namespaceManager); } else if (childNode.LocalName == "extLst") { ctObj.extLst = CT_ExtensionList.Parse(childNode, namespaceManager); } } return(ctObj); }
public CT_TableColumns AddNewTableColumns() { this.tableColumnsField = new CT_TableColumns(); return(this.tableColumnsField); }
public static CT_TableColumns Parse(XmlNode node, XmlNamespaceManager namespaceManager) { if (node == null) return null; CT_TableColumns ctObj = new CT_TableColumns(); if (node.Attributes["count"] != null) ctObj.count = XmlHelper.ReadUInt(node.Attributes["count"]); ctObj.tableColumn = new List<CT_TableColumn>(); foreach (XmlNode childNode in node.ChildNodes) { if (childNode.LocalName == "tableColumn") ctObj.tableColumn.Add(CT_TableColumn.Parse(childNode, namespaceManager)); } return ctObj; }