public TocExsRow extractTempData(TocExsRow parent) { var t = tocTemp; try { if (t.skipedCount == 0 && t.complPassiveCnt == 0 && t.complNotPassiveCnt == 0) return null; t.Items = Items == null ? null : Items.Select(it => it.extractTempData(t)).Where(it => it != null).ToArray(); return t; } finally { //vynuluj temp data foreach (var it in scan()) it.tempData = null; } }
static void adjustContainer(PivotGridCellTemplateContainer templateContainer, bool isProgress) { DevExpress.XtraPivotGrid.PivotDrillDownDataSource ds = templateContainer.Item.CreateDrillDownDataSource(); if (ds.RowCount == 0) return; if (ds.RowCount == 1) { var user = (UserEx)ds[0]["self"]; templateContainer.Controls.Add(new LiteralControl(isProgress ? user.ProgressBarHtml : user.ScoreBarHtml)); } else { TocExsRow row = new TocExsRow(); row.setUserExs(ds.OfType<DevExpress.XtraPivotGrid.PivotDrillDownDataRow>().Select(r => r["self"]).OfType<UserEx>().ToArray()); row.finishAfterRefreshNumbers(); templateContainer.Controls.Add(new LiteralControl(isProgress ? row.ProgressBarHtml : row.ScoreBarHtml)); } }