Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WebForms / System / Web / UI / Design / DataSetFieldSchema.cs / 1 / DataSetFieldSchema.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.Design { using System.Data; ////// public sealed class DataSetFieldSchema : IDataSourceFieldSchema { private DataColumn _column; public DataSetFieldSchema (DataColumn column) { if (column == null) { throw new ArgumentNullException("column"); } _column = column; } ////// Provides schema information for a single field. This schema information is used at /// at designtime to make decisions about what fields should be shown in field /// pickers for DataKeyField for DataBound controls, etc. /// ////// Returns a type object representing the type of data in the field. /// public Type DataType { get { return _column.DataType; } } ////// Returns true if the value of the field is generated by the database. /// public bool Identity { get { return _column.AutoIncrement; } } ////// Returns true if the field value cannot be changed. /// public bool IsReadOnly { get { return _column.ReadOnly; } } ////// Returns true if a constraint of this field is that its value must be unique. /// public bool IsUnique { get { return _column.Unique; } } ////// Returns the max length of the field, or -1 if none is specified. /// public int Length { get { return _column.MaxLength; } } ////// Returns the name of the field. /// public string Name { get { return _column.ColumnName; } } ////// Returns true if the field can take null values. /// public bool Nullable { get { return _column.AllowDBNull; } } public int Precision { get { return -1; } } ////// Returns true if this field is a key field of its view. /// public bool PrimaryKey { get { if ((_column.Table == null) || (_column.Table.PrimaryKey == null)) { return false; } foreach (DataColumn c in _column.Table.PrimaryKey) { if (c == _column) { return true; } } return false; } } public int Scale { get { return -1; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- FolderLevelBuildProviderCollection.cs
- Rfc2898DeriveBytes.cs
- SerializationTrace.cs
- LinqDataSource.cs
- WebBrowser.cs
- controlskin.cs
- MDIWindowDialog.cs
- CollectionEditorDialog.cs
- TextParaClient.cs
- HtmlElementErrorEventArgs.cs
- GridViewRow.cs
- ClientApiGenerator.cs
- ClipboardData.cs
- WindowsTooltip.cs
- NameScope.cs
- InitializerFacet.cs
- XPathDocumentBuilder.cs
- NamespaceCollection.cs
- EventHandlersStore.cs
- HierarchicalDataBoundControlAdapter.cs
- NotFiniteNumberException.cs
- XmlNavigatorStack.cs
- DbDataRecord.cs
- MSG.cs
- RichTextBox.cs
- ListControlStringCollectionEditor.cs
- TaskScheduler.cs
- NetworkInterface.cs
- EventLogEntry.cs
- PrefixQName.cs
- SignHashRequest.cs
- HttpException.cs
- XmlHelper.cs
- Listbox.cs
- QueryStringConverter.cs
- CodeMethodInvokeExpression.cs
- TextAction.cs
- ProfessionalColors.cs
- InboundActivityHelper.cs
- PublisherMembershipCondition.cs
- TypeConverter.cs
- CodeTypeParameter.cs
- DbConnectionInternal.cs
- TdsParserSafeHandles.cs
- SerialPort.cs
- Ticks.cs
- ReaderWriterLockWrapper.cs
- EntityParameterCollection.cs
- DataSetSchema.cs
- UriSection.cs
- DataStreamFromComStream.cs
- XamlStyleSerializer.cs
- XmlCDATASection.cs
- Context.cs
- EntityDataSourceWizardForm.cs
- SelectedCellsChangedEventArgs.cs
- Stylesheet.cs
- IIS7WorkerRequest.cs
- InputLanguageProfileNotifySink.cs
- SHA512Managed.cs
- TimeSpan.cs
- ComponentEditorForm.cs
- HtmlInputText.cs
- ValueProviderWrapper.cs
- SocketPermission.cs
- GroupBox.cs
- StoreItemCollection.Loader.cs
- NeutralResourcesLanguageAttribute.cs
- TogglePatternIdentifiers.cs
- EncoderParameter.cs
- SafeCancelMibChangeNotify.cs
- WizardSideBarListControlItemEventArgs.cs
- ToolTipAutomationPeer.cs
- SqlBinder.cs
- StackSpiller.Temps.cs
- Debugger.cs
- GeometryModel3D.cs
- DllNotFoundException.cs
- UniqueIdentifierService.cs
- KoreanCalendar.cs
- MailBnfHelper.cs
- SessionStateItemCollection.cs
- SqlProviderServices.cs
- XmlSchemaComplexContentExtension.cs
- EventManager.cs
- ExpressionBuilderContext.cs
- DetailsViewModeEventArgs.cs
- ParameterCollection.cs
- ManualWorkflowSchedulerService.cs
- BuildProviderAppliesToAttribute.cs
- PanelDesigner.cs
- DataGridSortCommandEventArgs.cs
- ToolStripPanelRenderEventArgs.cs
- PointCollectionConverter.cs
- FrameworkPropertyMetadata.cs
- ProxyGenerationError.cs
- ParameterCollection.cs
- SystemIPGlobalProperties.cs
- StaticExtensionConverter.cs
- DataGridViewSelectedColumnCollection.cs