Example #1
0
        public void SavePivotSettings(int order, AvrViewBand pivotBand)
        {
            Utils.CheckNotNull(pivotBand, "pivotBand");
            Order_Pivot        = order;
            m_DisplayNamePivot = Utils.IsEmpty(pivotBand.DisplayText) ? "" : pivotBand.DisplayText;
            var i = 0;

            foreach (var band in Bands)
            {
                var childBand = pivotBand.Bands.Find(b => b.UniquePath == band.UniquePath);
                if (childBand != null)
                {
                    band.SavePivotSettings(i++, childBand);
                }
            }

            foreach (var col in Columns)
            {
                var pivotCol = pivotBand.Columns.Find(c => c.UniquePath == col.UniquePath);
                if (pivotCol != null) // not aggregate column
                {
                    col.SavePivotSettings(i++, pivotCol);
                }
            }
        }
Example #2
0
 public void AddBand(int order, AvrViewBand band)
 {
     band.ViewID = m_ViewID;
     band.SavePivotSettings(order, band);
     band.SetUnchanged();
     band.Owner = this;
     Bands.Add(band);
 }
Example #3
0
        public AvrViewBand GetBandByOriginalName(string origName)
        {
            AvrViewBand ret = null;

            if (!string.IsNullOrEmpty(origName))
            {
                ret = Bands.Find(x => x.UniquePath == origName);
                if (ret == null)
                {
                    foreach (var band in Bands)
                    {
                        ret = band.GetBandByOriginalName(origName);
                        if (ret != null)
                        {
                            break;
                        }
                    }
                }
            }

            return(ret);
        }