private void FillDataTable(SemiRows semirows) { foreach (SemiRow semirow in semirows) { if (semirow.Level == 0) { continue; } DataRow dr = _currenttable.NewRow(); _currenttable.Rows.Add(dr); string groupkey = null; foreach (string key in _captiontoname.Keys) { object o = _captiontoname[key]; if (o != null) { if (o is string) { string v = semirow[o.ToString()].ToString(); if (v == "") { dr[key] = DBNull.Value; } else { dr[key] = v; } } else if (o is SimpleArrayList) { SimpleArrayList sal = o as SimpleArrayList; StringBuilder sb = new StringBuilder(); foreach (string s in sal) { if (sb.Length > 0) { sb.Append(" "); } sb.Append(semirow[s].ToString()); } groupkey = sb.ToString(); dr[key] = groupkey; } } } if (_cellnametocolumnname != null) { DrillData dd = new DrillData(_viewid, ((Cell)_currentmetrix).Name); foreach (string key in _cellnametocolumnname.Keys) { dd.Add(_cellnametocolumnname[key].ToString(), semirow[key]); } _chartdrilldata.Add(groupkey, dd); } } }
public void RefreshDrillTag(Row row) { foreach (Cell cell in row.Cells) { if (_cellnametocolumnname.Contains(cell.Name)) { _drilltag.Add(_cellnametocolumnname[cell.Name].ToString(), cell.Caption); } } }