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
- EntityViewContainer.cs
- ThicknessKeyFrameCollection.cs
- SoapAttributes.cs
- TraceEventCache.cs
- SwitchCase.cs
- CustomLineCap.cs
- CalendarDateRangeChangingEventArgs.cs
- ObjectPropertyMapping.cs
- ObjectStateEntry.cs
- CalculatedColumn.cs
- OutgoingWebResponseContext.cs
- SynchronizationContext.cs
- GlyphManager.cs
- LogReservationCollection.cs
- DesignerForm.cs
- InvalidPrinterException.cs
- SplashScreenNativeMethods.cs
- hresults.cs
- XmlKeywords.cs
- HostedTransportConfigurationBase.cs
- GeometryHitTestResult.cs
- TypefaceMetricsCache.cs
- TraceHwndHost.cs
- EventDescriptor.cs
- FixedSchema.cs
- TypePropertyEditor.cs
- CommonGetThemePartSize.cs
- TextBox.cs
- SqlInternalConnectionTds.cs
- DataAccessor.cs
- UnsafeNativeMethods.cs
- HttpContext.cs
- Util.cs
- WebPartUserCapability.cs
- FormViewDeletedEventArgs.cs
- Config.cs
- KeyboardDevice.cs
- FrugalMap.cs
- TableCell.cs
- StdValidatorsAndConverters.cs
- XmlAttributeCollection.cs
- VectorAnimation.cs
- BypassElementCollection.cs
- DataGrid.cs
- CommentEmitter.cs
- MethodCallExpression.cs
- MatrixTransform3D.cs
- SmtpReplyReaderFactory.cs
- HttpStreamXmlDictionaryWriter.cs
- FilteredAttributeCollection.cs
- QueryCacheEntry.cs
- Encoding.cs
- DecodeHelper.cs
- OdbcTransaction.cs
- PixelFormatConverter.cs
- WebPartEditorApplyVerb.cs
- FullTextBreakpoint.cs
- SspiSecurityTokenParameters.cs
- UdpSocketReceiveManager.cs
- UnsupportedPolicyOptionsException.cs
- ProtectedUri.cs
- LabelExpression.cs
- CompositionAdorner.cs
- InputDevice.cs
- HttpCapabilitiesBase.cs
- DnsPermission.cs
- WinEventHandler.cs
- CachedBitmap.cs
- DeclarativeExpressionConditionDeclaration.cs
- WindowsListViewGroup.cs
- TextDecoration.cs
- SHA1Managed.cs
- DataSourceComponent.cs
- CommentEmitter.cs
- ObjectNavigationPropertyMapping.cs
- HtmlWindow.cs
- ApplicationProxyInternal.cs
- SqlReorderer.cs
- WebBrowserHelper.cs
- _RegBlobWebProxyDataBuilder.cs
- WindowsGraphicsWrapper.cs
- StrokeRenderer.cs
- MobileControlsSectionHandler.cs
- SettingsProviderCollection.cs
- FormatConvertedBitmap.cs
- ObjRef.cs
- PackageDigitalSignature.cs
- DependencyPropertyHelper.cs
- EncoderReplacementFallback.cs
- GridViewRowPresenter.cs
- HttpStaticObjectsCollectionWrapper.cs
- ReferencedAssembly.cs
- DeviceContexts.cs
- RelationshipManager.cs
- WriteableOnDemandStream.cs
- AppDomain.cs
- HScrollBar.cs
- Accessors.cs
- IImplicitResourceProvider.cs
- SkipQueryOptionExpression.cs