Пример #1
0
        private void AddColumnToColumnsGrid(Column column)
        {
            SlyceTreeGridItem gridItem = new SlyceTreeGridItem();

            gridItem.Tag = column;
            gridItem.SubItems.Add(new SlyceTreeGridCellItem(column.Name));
            gridItem.SubItems.Add(new SlyceTreeGridCellItem(column.Description));
            gridItem.SubItems.Add(new SlyceTreeGridCellItem(column.IsNullable));
            gridItem.SubItems.Add(new SlyceTreeGridCellItem(column.OriginalDataType == null ? null : column.OriginalDataType.ToLower()));
            gridItem.SubItems.Add(new SlyceTreeGridCellItem(column.Default));
            gridItem.SubItems.Add(new SlyceTreeGridCellItem(column.OrdinalPosition));
            gridItem.SubItems.Add(new SlyceTreeGridCellItem(column.Size));
            gridItem.SubItems.Add(new SlyceTreeGridCellItem(column.SizeIsMax));
            gridItem.SubItems.Add(new SlyceTreeGridCellItem(column.Precision));
            gridItem.SubItems.Add(new SlyceTreeGridCellItem(column.Scale));

            foreach (IKey key in Table.Keys)
            {
                SlyceTreeGridCellItem item = new SlyceTreeGridCellItem(key.Columns.Contains(column));
                item.Enabled = true;                // column.InPrimaryKey;
                gridItem.SubItems.Add(item);
            }

            slyceGrid1.Items.Add(gridItem);
        }
Пример #2
0
        private SlyceTreeGridCellItem CreateNewNullableCell(ComponentPropertyImpl property, object value, ApplicableOptions options)
        {
            ApplicableOptions     applicableOptions = ValidationOptions.GetApplicableValidationOptionsForType(property.Type);
            SlyceTreeGridCellItem cell = new SlyceTreeGridCellItem(value, (applicableOptions & options) != options);

            cell.IsNullable = true;
            return(cell);
        }
Пример #3
0
        private SlyceTreeGridCellItem CreateNewNullableCell(ArchAngel.Providers.EntityModel.Model.EntityLayer.Property property, object value, ApplicableOptions options)
        {
            ApplicableOptions     applicableOptions = ValidationOptions.GetApplicableValidationOptionsForType(property.Type);
            SlyceTreeGridCellItem cell = new SlyceTreeGridCellItem(value, (applicableOptions & options) != options);

            cell.IsNullable = true;
            return(cell);
        }