public ViewColumnDrop(IPortalLiquidContext portalLiquidContext, IViewColumn column) : base(portalLiquidContext)
        {
            AttributeLogicalName = column.AttributeLogicalName;

            DisplayName = column.DisplayName;

            Width = column.Width;
        }
Esempio n. 2
0
        /// <summary>
        /// ソートリスト項目選択変更
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void lsvSortColumn_SelectedIndexChanged(object sender, EventArgs e)
        {
            this.SetButtonsStatus();
            if (this.lsvSortColumn.SelectedItems.Count == 0)
            {
                return;
            }
            IViewColumn column = this.lsvSortColumn.SelectedItems[0].Tag as IViewColumn;

            this.rdbDesc.Checked = column.IsSortDescending;
            this.rdbAsc.Checked  = !column.IsSortDescending;
        }
Esempio n. 3
0
        /// <summary>
        /// 列情報選択する場合
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void lsvNotesViewColumn_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (this.lsvNotesViewColumn.SelectedItems.Count == 0)
            {
                this.txtFormula.Text = "";
                return;
            }
            IViewColumn column = this.lsvNotesViewColumn.SelectedItems[0].Tag as IViewColumn;

            if (column == null)
            {
                return;
            }
            this.txtFormula.Text = column.Formula;
        }
Esempio n. 4
0
 /// <summary>
 /// グループ項目削除
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnDeleteGroup_Click(object sender, EventArgs e)
 {
     try
     {
         if (this.lsvGroupColumns.SelectedItems.Count == 0)
         {
             return;
         }
         IViewColumn column = this.lsvGroupColumns.SelectedItems[0].Tag as IViewColumn;
         this._targetView.GroupColumns.Remove(column);
         InitGroupColumnTab();
     }
     catch (Exception ex)
     {
         Log.Write(ex);
         RSM.ShowMessage(this, ex);
     }
 }
Esempio n. 5
0
 /// <summary>
 /// ソート種別設定
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnSortType_Click(object sender, EventArgs e)
 {
     try
     {
         if (this.lsvSortColumn.SelectedItems.Count == 0)
         {
             return;
         }
         ListViewItem lvItem = this.lsvSortColumn.SelectedItems[0];
         IViewColumn  column = lvItem.Tag as IViewColumn;
         column.IsSortDescending = this.rdbDesc.Checked;
         string desc = column.IsSortDescending ? "降順" : "昇順";
         lvItem.SubItems[2].Text = desc;
     }
     catch (Exception ex)
     {
         Log.Write(ex);
         RSM.ShowMessage(this, ex);
     }
 }
        /// <summary>
        ///     <para>
        ///         Creates a human-readable representation of the given metadata.
        ///     </para>
        ///     <para>
        ///         Warning: Do not rely on the format of the returned string.
        ///         It is designed for debugging only and may change arbitrarily between releases.
        ///     </para>
        /// </summary>
        /// <param name="column"> The metadata item. </param>
        /// <param name="options"> Options for generating the string. </param>
        /// <param name="indent"> The number of indent spaces to use before each new line. </param>
        /// <returns> A human-readable representation. </returns>
        public static string ToDebugString(
            [NotNull] this IViewColumn column,
            MetadataDebugStringOptions options,
            int indent = 0)
        {
            var builder      = new StringBuilder();
            var indentString = new string(' ', indent);

            builder.Append(indentString);

            var singleLine = (options & MetadataDebugStringOptions.SingleLine) != 0;

            if (singleLine)
            {
                builder.Append($"Column: {column.Table.Name}.");
            }

            builder.Append(column.Name).Append(" (");

            builder.Append(column.StoreType).Append(")");

            if (column.IsNullable)
            {
                builder.Append(" Nullable");
            }
            else
            {
                builder.Append(" NonNullable");
            }

            builder.Append(")");

            if (!singleLine &&
                (options & MetadataDebugStringOptions.IncludeAnnotations) != 0)
            {
                builder.Append(column.AnnotationsToDebugString(indent + 2));
            }

            return(builder.ToString());
        }
Esempio n. 7
0
            public IViewColumn Build(ViewTable.Builder.Node node, ViewSchema vs, Database.Schema baseSchema, ViewTable vTable, Operation.ExpressionParsingContext expressionParsingContext, ref Database.MetaColumn metaColumn)
            {
                // Check if we have a type mismatch
                Type columnValueType = metaColumn != null ? metaColumn.Type : null;

                if (value.type != null)
                {
                    if (columnValueType != null && columnValueType != value.type)
                    {
                        DebugUtility.LogWarning("While building column '" + name + "' : "
                                                + "Cannot override type from '" + columnValueType.Name
                                                + "' to '" + value.type.Name + "'");
                    }
                    columnValueType = value.type;
                }

                // Parse expression value
                Operation.Expression.ParseIdentifierOption parseOpt = new Operation.Expression.ParseIdentifierOption(vs, vTable, true, false, columnValueType, expressionParsingContext);
                parseOpt.formatError = (string s, Operation.Expression.ParseIdentifierOption opt) => {
                    return(FormatErrorContextInfo(vs, vTable) + " : " + s);
                };

                Operation.Expression expression = Operation.Expression.ParseIdentifier(value, parseOpt);


                // Build declaration with the type we've just parsed
                BuildOrUpdateDeclaration(ref metaColumn, expression.type);

                IViewColumn result = (IViewColumn)Operation.ColumnCreator.CreateViewColumnExpression(expression);
                ViewColumn  vc     = new ViewColumn();

                vc.m_MetaLink     = m_MetaLink;
                vc.viewTable      = vTable;
                vc.ParsingContext = expressionParsingContext;
                result.SetColumn(vc, null);
                return(result);
            }
 /// <inheritdoc />
 public virtual IEnumerable <IAnnotation> ForRemove(IViewColumn column)
 => Enumerable.Empty <IAnnotation>();
 /// <inheritdoc />
 public virtual IEnumerable <IAnnotation> For(IViewColumn column, bool designTime)
 => Enumerable.Empty <IAnnotation>();
 public IEnumerable <IAnnotation> ForRemove(IViewColumn column) => _providers.SelectMany(p => p.ForRemove(column));
Esempio n. 11
0
        public IViewColumn GetJoinView()
        {
            if (DataType is ForeingKeyDataType)
            {
                if (joinView_cached != null)
                    return joinView_cached;

                if (SchemaBaseRole.Roles.ContainsKey((Guid)(DataType as ForeingKeyDataType).RefTableID))
                    joinView_cached = (IViewColumn)SchemaBaseRole.Roles[(Guid)(DataType as ForeingKeyDataType).RefTableID];
                else
                    joinView_cached = (IViewColumn)App.Schema.GetObject<SchemaObject>((Guid)(DataType as ForeingKeyDataType).RefTableID);

                return joinView_cached;

            }
            else
                return Table;
        }
Esempio n. 12
0
        public override IViewColumn GetJoinView()
        {
            if (foreingQueryTableID == null)
            {
                if (GetSourceView() != null && GetSourceView().GetColumnByName(Name) != null)
                    return GetSourceView().GetColumnByName(Name).GetJoinView();
                else
                    return null;
            }
            else
            {
                if (joinView_cached != null)
                    return joinView_cached;

                if (SchemaBaseRole.Roles.ContainsKey((Guid)foreingQueryTableID))
                    joinView_cached = (IViewColumn)SchemaBaseRole.Roles[(Guid)foreingQueryTableID];
                else
                    joinView_cached = (IViewColumn)App.Schema.GetObject<SchemaObject>((Guid)foreingQueryTableID);

                return joinView_cached;
            }
        }
Esempio n. 13
0
        public override IViewColumn GetJoinView()
        {
            if (sourceQueryTableID == null)
                return null;

            if (joinView_cached != null)
                return joinView_cached;

            if (SchemaVirtualTable.VirtualTables.ContainsKey((Guid)sourceQueryTableID))
            {
                joinView_cached = SchemaVirtualTable.GetVirtualTable((Guid)sourceQueryTableID, VirtualTableProperties);
            }
            else
                if (SchemaBaseRole.Roles.ContainsKey((Guid)sourceQueryTableID))
                {
                    joinView_cached = SchemaBaseRole.Roles[(Guid)sourceQueryTableID] as Таблица_TableRole;
                }
                else
                    joinView_cached = (IViewColumn)App.Schema.GetObject<SchemaObject>((Guid)sourceQueryTableID);

            return joinView_cached;
        }
        public override IViewColumn GetJoinView()
        {
            if (foreingQueryTableID == null)
                return null;

            if (joinView_cached != null)
                return joinView_cached;

            if (SchemaBaseRole.Roles.ContainsKey((Guid)foreingQueryTableID))
                joinView_cached = (IViewColumn)SchemaBaseRole.Roles[(Guid)foreingQueryTableID];
            else
                joinView_cached = (IViewColumn)App.Schema.GetObject<SchemaObject>((Guid)foreingQueryTableID);

            return joinView_cached;
        }