コード例 #1
0
ファイル: ColumnMetadata.cs プロジェクト: mparsin/Elements
 public ColumnMetadata(GridColumn column)
 {
     Header = column.Header;
     SystemName = column.SystemName;
     Width = column.Width;
     SortDirection = column.SortDirection.ToString();
     GroupLevel = column.GroupLevel;
     SortLevel = column.SortLevel;
     IsVisible = true;
 }
コード例 #2
0
 private static ColumnMetadata CreateColumnMetadata(GridColumn columnSettings)
 {
     return new ColumnMetadata
                {
                    Header = columnSettings.Header,
                    SystemName = columnSettings.SystemName,
                    Width = columnSettings.Width,
                    SortDirection = columnSettings.SortDirection,
                    GroupLevel = columnSettings.GroupLevel,
                    SortLevel = columnSettings.SortLevel,
                    IsVisible = true
                };
 }
コード例 #3
0
        private static ColumnMetadata CreateDerivedProcessDisplayNameColumnMetadata(GridColumn columnSettings)
        {
            var columnMetadata = CreateColumnMetadata(columnSettings);
            columnMetadata.Header = Constants.DerivedProcessDisplayName;
            columnMetadata.ColumnType = ColumnTypes.String;

            return columnMetadata;
        }
コード例 #4
0
        private static ColumnMetadata CreateColumnMetadata(GridColumn column, IFieldMetadata field)
        {
            var columnMetadata = CreateColumnMetadata(column);
            SetFieldMetadata(columnMetadata, field);

            return columnMetadata;
        }
コード例 #5
0
ファイル: LayoutRepository.cs プロジェクト: mparsin/Elements
 private static Column CreateColumn(GridColumn gridColumn)
 {
     return new Column
                {
                    SystemName = gridColumn.SystemName,
                    Width = gridColumn.Width,
                    SortDirection = gridColumn.SortDirection,
                    SortLevel = gridColumn.SortLevel,
                    GroupLevel = gridColumn.GroupLevel
                };
 }
コード例 #6
0
ファイル: LayoutRepository.cs プロジェクト: mparsin/Elements
        private static GridColumn CreateGridColumn(Column column, IProcessMetadata processMetadata)
        {
            var gridColumn = new GridColumn
                                 {
                                     SystemName = column.SystemName,
                                     Header = column.SystemName,
                                     SortDirection = column.SortDirection,
                                     SortLevel = column.SortLevel,
                                     GroupLevel = column.GroupLevel,
                                     Width = column.Width
                                 };

            IFieldMetadata fieldMetadata;

            if (processMetadata.TryGetField(column.SystemName, out fieldMetadata))
            {
                gridColumn.Header = fieldMetadata.DisplayName;
            }

            return gridColumn;
        }