Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataWebControlsDesign / System / Data / WebControls / Design / EntityDesignerDataSourceView.cs / 1305376 / EntityDesignerDataSourceView.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //----------------------------------------------------------------------------- using System.Collections; using System.Data; using System.Web.UI.Design; namespace System.Web.UI.Design.WebControls { public class EntityDesignerDataSourceView : DesignerDataSourceView { private EntityDataSourceDesignerHelper _helper; public EntityDesignerDataSourceView(EntityDataSourceDesigner owner) : base(owner, EntityDataSourceDesignerHelper.DefaultViewName) { _helper = owner.Helper; } public override bool CanDelete { get { return CanModify && _helper.EnableDelete; } } public override bool CanInsert { get { return CanModify && _helper.EnableInsert; } } internal bool CanModify { get { return !String.IsNullOrEmpty(_helper.EntitySetName) && String.IsNullOrEmpty(_helper.Select) && String.IsNullOrEmpty(_helper.CommandText) && String.IsNullOrEmpty(_helper.GroupBy); } } public override bool CanPage { get { return _helper.CanPage; } } public override bool CanSort { get { return _helper.CanSort; } } public override bool CanUpdate { get { return CanModify && _helper.EnableUpdate; } } public override IDataSourceViewSchema Schema { get { DataTable schemaTable = _helper.LoadSchema(); if (schemaTable == null) { return null; } return new DataSetViewSchema(schemaTable); } } public override IEnumerable GetDesignTimeData(int minimumRows, out bool isSampleData) { DataTable schemaTable = _helper.LoadSchema(); if (schemaTable != null) { isSampleData = true; return DesignTimeData.GetDesignTimeDataSource(DesignTimeData.CreateSampleDataTable(new DataView(schemaTable), true), minimumRows); } // Couldn't find design-time schema, use base implementation return base.GetDesignTimeData(minimumRows, out isSampleData); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //----------------------------------------------------------------------------- using System.Collections; using System.Data; using System.Web.UI.Design; namespace System.Web.UI.Design.WebControls { public class EntityDesignerDataSourceView : DesignerDataSourceView { private EntityDataSourceDesignerHelper _helper; public EntityDesignerDataSourceView(EntityDataSourceDesigner owner) : base(owner, EntityDataSourceDesignerHelper.DefaultViewName) { _helper = owner.Helper; } public override bool CanDelete { get { return CanModify && _helper.EnableDelete; } } public override bool CanInsert { get { return CanModify && _helper.EnableInsert; } } internal bool CanModify { get { return !String.IsNullOrEmpty(_helper.EntitySetName) && String.IsNullOrEmpty(_helper.Select) && String.IsNullOrEmpty(_helper.CommandText) && String.IsNullOrEmpty(_helper.GroupBy); } } public override bool CanPage { get { return _helper.CanPage; } } public override bool CanSort { get { return _helper.CanSort; } } public override bool CanUpdate { get { return CanModify && _helper.EnableUpdate; } } public override IDataSourceViewSchema Schema { get { DataTable schemaTable = _helper.LoadSchema(); if (schemaTable == null) { return null; } return new DataSetViewSchema(schemaTable); } } public override IEnumerable GetDesignTimeData(int minimumRows, out bool isSampleData) { DataTable schemaTable = _helper.LoadSchema(); if (schemaTable != null) { isSampleData = true; return DesignTimeData.GetDesignTimeDataSource(DesignTimeData.CreateSampleDataTable(new DataView(schemaTable), true), minimumRows); } // Couldn't find design-time schema, use base implementation return base.GetDesignTimeData(minimumRows, out isSampleData); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- QilBinary.cs
- UserInitiatedRoutedEventPermissionAttribute.cs
- UrlAuthFailureHandler.cs
- FormattedText.cs
- EventHandlersStore.cs
- ConfigurationFileMap.cs
- ErrorsHelper.cs
- TextTreeFixupNode.cs
- TypeToArgumentTypeConverter.cs
- EntityDataSourceValidationException.cs
- documentsequencetextcontainer.cs
- CheckedPointers.cs
- DeadCharTextComposition.cs
- GridSplitterAutomationPeer.cs
- _ProxyRegBlob.cs
- oledbmetadatacollectionnames.cs
- TrackPointCollection.cs
- CommunicationObject.cs
- XmlQueryContext.cs
- DbParameterCollection.cs
- FrameworkContentElement.cs
- XmlSigningNodeWriter.cs
- Column.cs
- RelationalExpressions.cs
- IdleTimeoutMonitor.cs
- EntryWrittenEventArgs.cs
- ReferencedAssembly.cs
- TableRow.cs
- CircleEase.cs
- RelationshipEntry.cs
- GuidelineSet.cs
- ThrowHelper.cs
- MemoryStream.cs
- ConstraintConverter.cs
- DynamicDataExtensions.cs
- Inflater.cs
- PolyBezierSegment.cs
- SevenBitStream.cs
- GeneralTransformGroup.cs
- SmiEventSink_Default.cs
- TraceContextRecord.cs
- AdRotator.cs
- Dictionary.cs
- TextBounds.cs
- PropertyMetadata.cs
- GeometryGroup.cs
- StatementContext.cs
- ElementNotAvailableException.cs
- DataGridViewHitTestInfo.cs
- SoundPlayer.cs
- PatternMatcher.cs
- XmlSortKeyAccumulator.cs
- TextSelectionHighlightLayer.cs
- PageCache.cs
- DataKeyCollection.cs
- GridItem.cs
- DbParameterCollectionHelper.cs
- WebPartConnectionsEventArgs.cs
- PeerNode.cs
- SortKey.cs
- InvalidateEvent.cs
- DataTable.cs
- AuthenticatingEventArgs.cs
- MutexSecurity.cs
- ExpressionTable.cs
- BindingContext.cs
- SAPIEngineTypes.cs
- ConcatQueryOperator.cs
- HandoffBehavior.cs
- ErrorWebPart.cs
- TextElementCollection.cs
- COM2IManagedPerPropertyBrowsingHandler.cs
- LoginName.cs
- WebPartConnectionCollection.cs
- ResXDataNode.cs
- HtmlControlPersistable.cs
- StandardToolWindows.cs
- SchemaElement.cs
- DiagnosticTrace.cs
- RowParagraph.cs
- StylusCaptureWithinProperty.cs
- SQLDecimal.cs
- WebPartConnectionsEventArgs.cs
- LicenseException.cs
- QilXmlReader.cs
- RoleGroup.cs
- MessageTransmitTraceRecord.cs
- Transform3D.cs
- DataGridColumnCollection.cs
- SortFieldComparer.cs
- EntityStoreSchemaGenerator.cs
- DurableRuntimeValidator.cs
- OleDbConnectionInternal.cs
- CompilerGeneratedAttribute.cs
- FormsAuthenticationModule.cs
- HttpConfigurationContext.cs
- UnicastIPAddressInformationCollection.cs
- CookieProtection.cs
- PathGradientBrush.cs
- Slider.cs