internal PivotArea ToPivotArea() { PivotArea pa = new PivotArea(); if (this.Field != null) pa.Field = this.Field.Value; if (this.Type != PivotAreaValues.Normal) pa.Type = this.Type; if (this.DataOnly != true) pa.DataOnly = this.DataOnly; if (this.LabelOnly != false) pa.LabelOnly = this.LabelOnly; if (this.GrandRow != false) pa.GrandRow = this.GrandRow; if (this.GrandColumn != false) pa.GrandColumn = this.GrandColumn; if (this.CacheIndex != false) pa.CacheIndex = this.CacheIndex; if (this.Outline != true) pa.Outline = this.Outline; if (this.Offset != null && this.Offset.Length > 0) pa.Offset = this.Offset; if (this.CollapsedLevelsAreSubtotals != false) pa.CollapsedLevelsAreSubtotals = this.CollapsedLevelsAreSubtotals; if (this.Axis != null) pa.Axis = this.Axis.Value; if (this.FieldPosition != null) pa.FieldPosition = this.FieldPosition.Value; if (this.PivotAreaReferences.Count > 0) { pa.PivotAreaReferences = new PivotAreaReferences(); foreach (SLPivotAreaReference par in this.PivotAreaReferences) { pa.PivotAreaReferences.Append(par.ToPivotAreaReference()); } } return pa; }
public static bool _set(PivotGridControl pivotGrid, FieldPivot[] fieldPivots, PivotArea pivotArea) { foreach (FieldPivot field in fieldPivots) { PivotGridField _field = new PivotGridField(); _field.Area = pivotArea; if (!_setField(field, _field)) { PLMessageBox.ShowErrorMessage( (pivotArea == PivotArea.RowArea ? "Row" : (pivotArea == PivotArea.ColumnArea ? "Column" : "Data")) + "Field cấu hình không đúng."); return false; } pivotGrid.Fields.Add(_field); } return true; }
internal void FromPivotArea(PivotArea pa) { this.SetAllNull(); if (pa.Field != null) this.Field = pa.Field.Value; if (pa.Type != null) this.Type = pa.Type.Value; if (pa.DataOnly != null) this.DataOnly = pa.DataOnly.Value; if (pa.LabelOnly != null) this.LabelOnly = pa.LabelOnly.Value; if (pa.GrandRow != null) this.GrandRow = pa.GrandRow.Value; if (pa.GrandColumn != null) this.GrandColumn = pa.GrandColumn.Value; if (pa.CacheIndex != null) this.CacheIndex = pa.CacheIndex.Value; if (pa.Outline != null) this.Outline = pa.Outline.Value; if (pa.Offset != null) this.Offset = pa.Offset.Value; if (pa.CollapsedLevelsAreSubtotals != null) this.CollapsedLevelsAreSubtotals = pa.CollapsedLevelsAreSubtotals.Value; if (pa.Axis != null) this.Axis = pa.Axis.Value; if (pa.FieldPosition != null) this.FieldPosition = pa.FieldPosition.Value; SLPivotAreaReference par; using (OpenXmlReader oxr = OpenXmlReader.Create(pa)) { while (oxr.Read()) { if (oxr.ElementType == typeof(PivotAreaReference)) { par = new SLPivotAreaReference(); par.FromPivotAreaReference((PivotAreaReference)oxr.LoadCurrentElement()); this.PivotAreaReferences.Add(par); } } } }
public WebPivotGridField(string fieldName, PivotArea area) : base(fieldName, area) { }
public void UpdateDescription(PivotArea area, string description) { _fieldListPresenterCache[area].UpdateDescription(description); }
public void SetAreaView(PivotArea area, IView view) { panelFromArea(area).FillWith(view); }
public static bool Is(this PivotArea pivotArea, PivotArea pivotAreaToCompare) { return((pivotArea & pivotAreaToCompare) != 0); }
internal PivotArea ToPivotArea() { PivotArea pa = new PivotArea(); if (this.Field != null) { pa.Field = this.Field.Value; } if (this.Type != PivotAreaValues.Normal) { pa.Type = this.Type; } if (this.DataOnly != true) { pa.DataOnly = this.DataOnly; } if (this.LabelOnly != false) { pa.LabelOnly = this.LabelOnly; } if (this.GrandRow != false) { pa.GrandRow = this.GrandRow; } if (this.GrandColumn != false) { pa.GrandColumn = this.GrandColumn; } if (this.CacheIndex != false) { pa.CacheIndex = this.CacheIndex; } if (this.Outline != true) { pa.Outline = this.Outline; } if (this.Offset != null && this.Offset.Length > 0) { pa.Offset = this.Offset; } if (this.CollapsedLevelsAreSubtotals != false) { pa.CollapsedLevelsAreSubtotals = this.CollapsedLevelsAreSubtotals; } if (this.Axis != null) { pa.Axis = this.Axis.Value; } if (this.FieldPosition != null) { pa.FieldPosition = this.FieldPosition.Value; } if (this.PivotAreaReferences.Count > 0) { pa.PivotAreaReferences = new PivotAreaReferences(); foreach (SLPivotAreaReference par in this.PivotAreaReferences) { pa.PivotAreaReferences.Append(par.ToPivotAreaReference()); } } return(pa); }
internal void FromPivotArea(PivotArea pa) { this.SetAllNull(); if (pa.Field != null) { this.Field = pa.Field.Value; } if (pa.Type != null) { this.Type = pa.Type.Value; } if (pa.DataOnly != null) { this.DataOnly = pa.DataOnly.Value; } if (pa.LabelOnly != null) { this.LabelOnly = pa.LabelOnly.Value; } if (pa.GrandRow != null) { this.GrandRow = pa.GrandRow.Value; } if (pa.GrandColumn != null) { this.GrandColumn = pa.GrandColumn.Value; } if (pa.CacheIndex != null) { this.CacheIndex = pa.CacheIndex.Value; } if (pa.Outline != null) { this.Outline = pa.Outline.Value; } if (pa.Offset != null) { this.Offset = pa.Offset.Value; } if (pa.CollapsedLevelsAreSubtotals != null) { this.CollapsedLevelsAreSubtotals = pa.CollapsedLevelsAreSubtotals.Value; } if (pa.Axis != null) { this.Axis = pa.Axis.Value; } if (pa.FieldPosition != null) { this.FieldPosition = pa.FieldPosition.Value; } SLPivotAreaReference par; using (OpenXmlReader oxr = OpenXmlReader.Create(pa)) { while (oxr.Read()) { if (oxr.ElementType == typeof(PivotAreaReference)) { par = new SLPivotAreaReference(); par.FromPivotAreaReference((PivotAreaReference)oxr.LoadCurrentElement()); this.PivotAreaReferences.Add(par); } } } }
IEnumerable <IModelFormatRule> FormatRuleModels(Point point, PivotArea pivotArea) { return(SelectionRuleModels(point).OfType <IModelFormatRule>().Where(rule => rule.PivotArea == pivotArea)); }
public IEnumerable <FormatInfo> FormatInfos(Point point, PivotArea pivotArea) { return(FormatRuleModels(point, pivotArea).Select(FormatInfo)); }
/// <summary> /// /// </summary> /// <param name="fieldName">Column Field 명</param> /// <param name="caption">Column Header Text</param> /// <param name="decimalPlace">소숫점 자리수</param> /// <param name="area">Field 위치</param> /// <param name="dataType">Data Type</param> /// <remarks> /// 2008-12-17 최초생성 : 황준혁 /// 변경내역 /// /// </remarks> public void InitGridField(string fieldName, string caption, int decimalPlace, PivotArea area, ColumnDataType dataType) { PivotGridField gridField; bool existField = base.Fields[fieldName] == null ? false : true; gridField = existField ? base.Fields[fieldName] : new PivotGridField(); gridField.FieldName = fieldName; gridField.Caption = caption; gridField.Options.AllowEdit = false; if (!existField) { Fields.Add(gridField); } if (!existField) { gridField.AreaIndex = base.Fields.Count - 1; } SetColumnDataType(gridField, dataType, decimalPlace); gridField.Area = area; }
/// <summary> /// /// </summary> /// <param name="fieldName">Column Field 명</param> /// <param name="caption">Column Header Text</param> /// <param name="area">Field 위치</param> /// <param name="dataType">Data Type</param> /// <remarks> /// 2008-12-17 최초생성 : 황준혁 /// 변경내역 /// /// </remarks> public void InitGridField(string fieldName, string caption, PivotArea area, ColumnDataType dataType) { InitGridField(fieldName, caption, 0, area, dataType); }
/// <summary> /// Grid Column을 초기화합니다. /// </summary> /// <param name="fieldName">Column Field 명</param> /// <param name="caption">Column Header Text</param> /// <param name="area">Field 위치</param> /// <remarks> /// 2008-12-17 최초생성 : 황준혁 /// 변경내역 /// /// </remarks> public void InitGridField(string fieldName, string caption, PivotArea area) { InitGridField(fieldName, caption, area, ColumnDataType.Numeric); }