Exemple #1
0
        private ProfileAttributesRow CreateRow(TextRow tRow, ref int index)
        {
            ProfileAttributesRow row = new ProfileAttributesRow();

            row.Number = index++;

            ColumHeader.ForEach(c => row.Cells.Add(new ProfileAttributeCell()
            {
                Column = c, Row = row, Value = tRow[c.Number - 1]
            }));

            return(row);
        }
Exemple #2
0
        private ProfileAttributesRow CreateRow(List <ProfileAttributeCell> tRow, ref int index)
        {
            ProfileAttributesRow row = new ProfileAttributesRow();

            row.Number = index++;
            if (tRow.Count == ColumHeader.Count)
            {
                ColumHeader.Select((c, colIndex) => new { Col = c, Index = colIndex }).ToList().ForEach(c => row.Cells.Add(ProfileAttributeCell.Update(tRow[c.Index], c.Col, row)));
            }
            else
            {
                ColumHeader.ForEach(c => row.Cells.Add(ProfileAttributeCell.Update(tRow[c.Number - 1], c, row)));
            }

            return(row);
        }
Exemple #3
0
        private ProfileAttributesRow CreateRow(List <String> tRow, ref int index)
        {
            ProfileAttributesRow row = new ProfileAttributesRow();

            row.Number = index++;
            if (tRow.Count == ColumHeader.Count)
            {
                ColumHeader.Select((c, colIndex) => new { Col = c, Index = colIndex }).ToList().ForEach(c => row.Cells.Add(new ProfileAttributeCell()
                {
                    Column = c.Col, Row = row, Value = tRow[c.Index]
                }));
            }
            else
            {
                ColumHeader.ForEach(c => row.Cells.Add(new ProfileAttributeCell()
                {
                    Column = c, Row = row, Value = tRow[c.Number - 1]
                }));
            }

            return(row);
        }
Exemple #4
0
 public static ProfileAttributeCell Update(ProfileAttributeCell cell, ProfileAttributeColumn col, ProfileAttributesRow row)
 {
     cell.Column = col;
     cell.Row    = row;
     return(cell);
 }