private void AppendAValue(ref SimpleHashtable values, string key, object value) { if (values == null) { values = new SimpleHashtable(); } if (values.Contains(key)) { double d1 = 0; if (values[key] == null || values[key].ToString() == "") { d1 = 0; } else { d1 = Convert.ToDouble(values[key]); } double d2 = 0; if (value == null || value.ToString() == "") { d2 = 0; } else { d2 = Convert.ToDouble(value); } values.Add(key, d1 + d2); } else { values.Add(key, value); } }
protected void CreateNameToColumnMap() { _cellnametocolumnname = new SimpleHashtable(); foreach (Section section in _currentreport.Sections) { if (section is GroupHeader) { foreach (Cell cell in section.Cells) { if (cell is IGroup) { _cellnametocolumnname.Add(cell.Name, (cell as IMapName).MapName); } } } else if (section is Detail) { foreach (Cell cell in section.Cells) { if (cell is GroupDimension || cell is CalculateGroupDimension) { _cellnametocolumnname.Add(cell.Name, (cell as IMapName).MapName); } } } } }
private void BuildTheLastMetrix() { if (_currentmetrix != null) { if ((_currentmetrix as Cell).Visible) { AddToNewLinesFromRows(); _rows.Clear(); } if (_captiontoname != null) { foreach (Cell cell in _currentcells) { if (cell is Chart && (cell as Chart).DataSource.ToLower().Trim() == (_currentmetrix as Cell).Name.ToLower().Trim()) { Hashtable h = new Hashtable(); h.Add((cell as Chart).Level, _designcaptiontodesignname); (cell as Chart).CaptionToName = h; (cell as Chart).DrillTag = _chartdrilldata; } } _captiontoname.Clear(); } _captiontoname = null; _currenttable = null; _designcaptiontodesignname = null; _rowsheight = 0; _cellnametocolumnname = null; _chartdrilldata = null; } }
private object GetAValue(SimpleHashtable hash, string key) { if (hash != null && hash.Contains(key)) { return(hash[key]); } return(null); }
public void AddData(string key, object value) { if (_getdatas == null) { _getdatas = new SimpleHashtable(); } _getdatas.Add(key, value); }
public void Dispose() { _data.Clear(); _data = null; _semirow = null; _minorrow = null; _reader = null; }
public SimpleHashtable(SimpleHashtable sh) : this() { foreach (string key in sh.Keys) { _hash.Add(key, sh[key]); _keys.Add(key); } }
public void OpenChartWizard(Chart chart) { ChartService _chartservice = null; string id = null; if (chart.Report.Type == ReportType.IndicatorReport) { id = "IndicatorChart"; Hashtable ctn = new Hashtable(); SimpleHashtable sht = new SimpleHashtable(); if (!string.IsNullOrEmpty(chart.DataSource)) { Section indicatordetail = chart.Report.Sections[SectionType.IndicatorDetail]; IIndicatorMetrix metrix = indicatordetail.Cells[chart.DataSource] as IIndicatorMetrix; if (metrix == null) { throw new Exception("非法图表数据源矩阵"); } sht.Add("__bcross__", metrix.CrossPart != null); if (metrix.IndicatorParts != null) { foreach (IPart indi in metrix.IndicatorParts) { sht.Add((indi as Cell).Caption, (indi as Cell).Name); } } } else { sht.Add("__bcross__", false); } ctn.Add(chart.Level, sht); _chartservice = new IndicatorChartService(chart.Report, ctn); } else { _chartservice = new ChartService(chart.Report); } ChartWizardAdapter _wizardadapter = new ChartWizardAdapter(_chartservice); if (_wizardadapter.ChartWizard.ShowDialog(_chartservice.GetSchemasAllLevel(chart.Level), chart.Level, id) == DialogResult.OK) { RemoteDataHelper rdh = DefaultConfigs.GetRemoteHelper(); rdh.SaveChartStrings(ClientReportContext.Login.UfMetaCnnString, chart.Report.ViewID, chart.Report.ChartStrings); } else { chart.Report.ChartStrings = null; } chart.ChartWizard = null; }
private void CreateDataTable(Section pagetitle)//from pagetitle,designcaption=null, to be x; ____ to be none; a___b to be two new columns; others to be a new column { _captiontoname = new SimpleHashtable(); _designcaptiontodesignname = new SimpleHashtable(); _designcaptiontodesignname.Add("__bcross__", _currentreport.Type == ReportType.CrossReport); _currenttable = new DataTable((_currentmetrix as Cell).Name); AddATableColumn("X", new SimpleArrayList(), typeof(string), null, null); _data.Tables.Add(_currenttable); foreach (Cell cell in pagetitle.Cells) { if (cell is Label) { Label l = cell as Label; if (l.DesignCaption != "____") { if (l is SuperLabel) { foreach (Label sl in (l as SuperLabel).Labels) { if (!string.IsNullOrEmpty(sl.DesignCaption) && sl.DesignCaption != "____") { AddATableColumn(l.Caption + "____" + sl.Caption, sl.Name, typeof(decimal), sl.Caption, sl.DesignName); } //AddATableColumn(l.DesignCaption + "____" + sl.DesignCaption, sl.Name, typeof(decimal), sl.DesignCaption, sl.DesignName); } } else if (string.IsNullOrEmpty(l.DesignCaption))//x { SimpleArrayList sal = _captiontoname["X"] as SimpleArrayList; sal.Add(l.Name); } else { AddATableColumn(l.Caption, l.Name, typeof(decimal), l.Caption, l.DesignName); //AddATableColumn(l.DesignCaption, l.Name, typeof(decimal), l.DesignCaption, l.DesignName); } } } } }
public void SetDrillTag(DrillData dd, SimpleHashtable cellnametocolumnname) { _drilltag = dd; _cellnametocolumnname = cellnametocolumnname; }
protected RowData(SerializationInfo info, StreamingContext context) { _data = (SimpleHashtable)info.GetValue("Data", typeof(SimpleHashtable)); }
public RowData() { _data = new SimpleHashtable(); }
public DrillData(string viewid, string matrixname) { _viewid = viewid; _matrixname = matrixname; _data = new SimpleHashtable(); }