Пример #1
0
        /// <summary>
        /// Gets the validation rows for the table.
        /// </summary>
        /// <param name="validationTable">Defintion for the validation table.</param>
        /// <returns>Collection of output rows for the validation table.</returns>
        internal OutputRowCollection GetValidationRows(TableDefinition validationTable)
        {
            OutputRowCollection outputRows = new OutputRowCollection();

            foreach (ColumnDefinition columnDef in this.columns)
            {
                if (columnDef.IsUnreal)
                {
                    continue;
                }

                Row row = new Row(validationTable);

                row[0] = this.name;

                row[1] = columnDef.Name;

                if (columnDef.IsNullable)
                {
                    row[2] = "Y";
                }
                else
                {
                    row[2] = "N";
                }

                if (columnDef.IsMinValueSet)
                {
                    row[3] = columnDef.MinValue;
                }

                if (columnDef.IsMaxValueSet)
                {
                    row[4] = columnDef.MaxValue;
                }

                row[5] = columnDef.KeyTable;

                if (columnDef.IsKeyColumnSet)
                {
                    row[6] = columnDef.KeyColumn;
                }

                if (ColumnCategory.Unknown != columnDef.Category)
                {
                    row[7] = columnDef.Category.ToString();
                }

                row[8] = columnDef.Possibilities;

                row[9] = columnDef.Description;

                outputRows.Add(new OutputRow(row));
            }

            return(outputRows);
        }
Пример #2
0
        /// <summary>
        /// Gets the validation rows for the table.
        /// </summary>
        /// <param name="validationTable">Defintion for the validation table.</param>
        /// <returns>Collection of output rows for the validation table.</returns>
        internal OutputRowCollection GetValidationRows(TableDefinition validationTable)
        {
            OutputRowCollection outputRows = new OutputRowCollection();

            foreach (ColumnDefinition columnDef in this.columns)
            {
                if (columnDef.IsUnreal)
                {
                    continue;
                }

                Row row = new Row(validationTable);

                row[0] = this.name;

                row[1] = columnDef.Name;

                if (columnDef.IsNullable)
                {
                    row[2] = "Y";
                }
                else
                {
                    row[2] = "N";
                }

                if (columnDef.IsMinValueSet)
                {
                    row[3] = columnDef.MinValue;
                }

                if (columnDef.IsMaxValueSet)
                {
                    row[4] = columnDef.MaxValue;
                }

                row[5] = columnDef.KeyTable;

                if (columnDef.IsKeyColumnSet)
                {
                    row[6] = columnDef.KeyColumn;
                }

                if (ColumnCategory.Unknown != columnDef.Category)
                {
                    row[7] = columnDef.Category.ToString();
                }

                row[8] = columnDef.Possibilities;

                row[9] = columnDef.Description;

                outputRows.Add(new OutputRow(row));
            }

            return outputRows;
        }