Exemplo n.º 1
0
        // used from Web to fill combos "Chart Series" and "Map Diagram Series"
        public static IEnumerable <AvrViewColumn> GetMapDefChartListWeb(AvrView view)
        {
            var list = view.GetMapDefChartList();

            list.Insert(0, AvrViewColumn.GetSelectAll(view));
            return(list);
        }
Exemplo n.º 2
0
        // column from database
        public void AddColumn(DataRow row)
        {
            var col = new AvrViewColumn(row)
            {
                Owner = this
            };

            Columns.Add(col);
        }
Exemplo n.º 3
0
        // returns (Select All) for web
        public static AvrViewColumn GetSelectAll(AvrView view)
        {
            var col = new AvrViewColumn(-1, "-1", "(" + EidssMessages.Get("strSelectAll_Id", "Select All") + ")", 0);

            col.FullPath   = col.DisplayText;
            col.UniquePath = col.LayoutSearchFieldName;
            col.Owner      = view;
            col.ViewID     = view.LayoutID;
            return(col);
        }
Exemplo n.º 4
0
 public void SavePivotSettings(int order, AvrViewColumn pivotCol)
 {
     IsToDelete            = false;
     Order_Pivot           = order;
     m_DisplayNamePivot    = pivotCol.DisplayText;
     IsRowArea             = pivotCol.IsRowArea;
     IsAdministrativeUnit  = pivotCol.IsAdministrativeUnit;
     Precision             = pivotCol.Precision;
     ColumnWidth_Pivot     = pivotCol.ColumnWidth;
     LayoutSearchFieldName = pivotCol.LayoutSearchFieldName;
     FieldType             = pivotCol.FieldType;
     GisReferenceTypeId    = pivotCol.GisReferenceTypeId;
     CustomSummaryType     = pivotCol.CustomSummaryType;
 }
Exemplo n.º 5
0
        public List <AvrViewColumn> GetVisibleRowAdminColumns(string path, bool?isRow, bool?isAdministrative, bool insertEmpty)
        {
            List <AvrViewColumn> result;

            if (insertEmpty)
            {
                var empty = new AvrViewColumn {
                    FieldType = typeof(string)
                };
                result = new List <AvrViewColumn> {
                    empty
                };
            }
            else
            {
                result = new List <AvrViewColumn>();
            }

            return(GetVisibleRowAdminColumns(path, isRow, isAdministrative, result));
        }
Exemplo n.º 6
0
        // get nonrow numeric columns
        public List <AvrViewColumn> GetVisibleNotRowColumns(bool insertEmpty)
        {
            List <AvrViewColumn> result;

            if (insertEmpty)
            {
                var empty = new AvrViewColumn {
                    FieldType = typeof(string)
                };
                result = new List <AvrViewColumn> {
                    empty
                };
            }
            else
            {
                result = new List <AvrViewColumn>();
            }

            result.AddRange(GetVisibleRowAdminColumns(false, null, false).FindAll(x => x.FieldType.IsNumeric()));
            return(result); //.OrderBy(c => c.Order_ForUse).ToList(); don't order here, because Order_ForUse have sense only inside band
        }
Exemplo n.º 7
0
        public AvrViewColumn AddAggregateColumn()
        {
            // if there is no columns in this band - return null
            if (this is AvrView && Columns.FindAll(col => !col.IsToDelete && col.IsVisible).Count == 0)
            {
                return(null);
            }

            var colName      = EidssMessages.Get("AggregateColumn", "Aggregate Column");
            var colFieldName = "AggregateColumn" + DateTime.Now.TimeOfDay;
            var newCol       = new AvrViewColumn(-1, colFieldName, colName, AvrView.DefaultFieldWidth)
            {
                IsAggregate  = true,
                Order_Pivot  = Columns.Count,
                OriginalName = colName,
                UniquePath   = colFieldName
            };

            AddColumn(newCol);
            return(newCol);
        }
Exemplo n.º 8
0
        public AvrViewColumn GetColumnByOriginalName(string origName)
        {
            AvrViewColumn ret = null;

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

            return(ret);
        }
Exemplo n.º 9
0
        public AvrViewColumn GetColumnByID(long?id)
        {
            AvrViewColumn ret = null;

            if (id != null)
            {
                ret = Columns.Find(x => x.ID == id);
                if (ret == null)
                {
                    foreach (var band in Bands)
                    {
                        ret = band.GetColumnByID(id);
                        if (ret != null)
                        {
                            break;
                        }
                    }
                }
            }

            return(ret);
        }
Exemplo n.º 10
0
 // column from pivot
 public void AddColumn(AvrViewColumn col)
 {
     col.ViewID = ViewID;
     col.Owner  = this;
     Columns.Add(col);
 }