public static DCTDataRow FromTableRow(TableRow row, DCTDataColumnCollection colCollection)
        {
            List<TableCell> cells = row.Descendants<TableCell>().ToList();
            DCTDataRow result = new DCTDataRow();
            result.isEmpty = true;
            for(int i=0;i<cells.Count;i++)
            {
                DCTDataColumn column = null;
                if (colCollection.TryGetValue(i, out column))
                {
                    if (!string.IsNullOrEmpty(cells[i].InnerText))
                        result.isEmpty = false;
                    result[column] = cells[i].InnerText;
                }
            }
            return result;

        }
Exemple #2
0
        public static DCTDataRow FromTableRow(TableRow row, DCTDataColumnCollection colCollection)
        {
            List <TableCell> cells  = row.Descendants <TableCell>().ToList();
            DCTDataRow       result = new DCTDataRow();

            result.isEmpty = true;
            for (int i = 0; i < cells.Count; i++)
            {
                DCTDataColumn column = null;
                if (colCollection.TryGetValue(i, out column))
                {
                    if (!string.IsNullOrEmpty(cells[i].InnerText))
                    {
                        result.isEmpty = false;
                    }
                    result[column] = cells[i].InnerText;
                }
            }
            return(result);
        }