Beispiel #1
0
        //private ProfileExternalTextRow CreateExternalRow(TextRow row, List<int> colIndexes, ref int index)
        //{
        //    ProfileExternalTextRow result = new ProfileExternalTextRow();
        //    result.Number = index;
        //    result.AddRange(row.Select((value, i) => new { Value = value, Index = i }).Where(c => colIndexes.Contains(c.Index)).Select(c => c.Value).ToList());
        //    index += 1;
        //    return result;
        //}

        public List <ProfileAttributeCell> GetColumnCells(ProfileAttributeType attribute)
        {
            List <ProfileAttributeCell> items = new List <ProfileAttributeCell>();

            if (ColumHeader.Where(c => c.Attribute == attribute).Any())
            {
                ProfileAttributeColumn col = ColumHeader.Where(c => c.Attribute == attribute).FirstOrDefault();

                items = (from r in Rows select r.GetCell(col)).ToList();
                // Rows.ForEach(r => items.AddRange(r.Select((value, i) => new { Value = value, Index = i }).Where(item => item.Index == index).Select(item => item.Value).ToList()));
            }
            return(items);
        }
Beispiel #2
0
 public static ProfileAttributeCell Update(ProfileAttributeCell cell, ProfileAttributeColumn col, ProfileAttributesRow row)
 {
     cell.Column = col;
     cell.Row    = row;
     return(cell);
 }
 public ProfileAttributeCell GetCell(ProfileAttributeColumn column)
 {
     return(Cells.Where(c => c.Column == column).FirstOrDefault());
 }