public XOTable(XOApplication XOApplication, XOPTable XOPTable, XWPTable XWPTable, XSPTable XSPTable) { _xoApplication = XOApplication; _xopTable = XOPTable; _xwpTable = XWPTable; _xspTable = XSPTable; _fields = XopTable.Fields.Fields.Select(p => new XOField(this, p, XWPTable != null ? XWPTable.Fields.Fields.FirstOrDefault(s => s.FieldName == p.Name) : null, XSPTable != null ? XSPTable.Fields.FirstOrDefault(s => s.FieldName == p.Name) : null)).ToArray(); if (XoApplication.XopDataSet.Relations != null) { _childrenRelations = XoApplication.XopDataSet.Relations.Relations.Where(p => p.ParentTable == this.Name) .Select(p => new XORelation( this, p, GetXwpRelation(p.Name)) ).ToArray(); } else { _childrenRelations = new XORelation[] { }; } }
public XWPFields(XWPTable XWPTable, XElement XElement) { _xWPTable = XWPTable; _parentDisplayField = XmlLinq.ReadAttribute(XElement, "parentDisplayField", XOApplication.xmlReaderLog); _fields = XmlLinq.GetChildren(XElement, "Field", Range.NotBound, XOApplication.xmlReaderLog).Select(p=>new XWPField(this, p)).ToArray(); }