private static DCTComplexProperty ConvertToComplexProperty(PropertyInfo propInfo, object source)
        {
            DCTComplexProperty complexProp = new DCTComplexProperty();
            foreach (PropertyInfo item in propInfo.GetType().GetProperties())
	        {

	        }
            return complexProp;
        }
Exemplo n.º 2
0
        private static DCTComplexProperty ConvertToComplexProperty(PropertyInfo propInfo, object source)
        {
            DCTComplexProperty complexProp = new DCTComplexProperty();

            foreach (PropertyInfo item in propInfo.GetType().GetProperties())
            {
            }
            return(complexProp);
        }
Exemplo n.º 3
0
        private static void processDataAreas(WordprocessingDocument document, DCTWordDataObject wdo, List <int> ignoreControls)
        {
            var titleRows = document.MainDocumentPart.Document.Body
                            .Descendants <TableRow>().Where(o => o.Descendants <BookmarkStart>().Any());

            foreach (TableRow titleRow in titleRows)
            {
                var bookmarkStart = titleRow.Descendants <BookmarkStart>().FirstOrDefault();

                if (bookmarkStart == null)
                {
                    continue;
                }

                if (bookmarkStart.ColumnFirst == null)
                {
                    continue;
                }


                //针对每一个区域,先读取表头的控件,同时将控件加入黑名单
                DCTDataColumnCollection collection = new DCTDataColumnCollection(titleRow);

                ignoreControls.AddRange(collection.CoveredControlIds);


                //遍历区域中的每一行,生成复杂属性

                var curRow = titleRow.NextSibling <TableRow>();

                DCTComplexProperty cp = new DCTComplexProperty();

                cp.TagID = bookmarkStart.Name;

                while (null != curRow && (!curRow.Descendants <BookmarkEnd>().Any(o => o.Id == bookmarkStart.Id)))
                {
                    DCTWordDataObject childWdo = new DCTWordDataObject();

                    DCTDataRow newDataRow = DCTDataRow.FromTableRow(curRow, collection);

                    if (!newDataRow.IsEmpty)
                    {
                        childWdo.PropertyCollection.AddRange <DCTSimpleProperty>(newDataRow.ToSimpleProperties());
                    }

                    curRow = curRow.NextSibling <TableRow>();

                    cp.DataObjects.Add(childWdo);
                }

                wdo.PropertyCollection.Add(cp);
            }
        }
 public ComplexPropertyProcessor(WordprocessingDocument document, DCTComplexProperty dataProperty)
     : base(document, dataProperty)
 {
 }