Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- FtpWebResponse.cs
- EpmSyndicationContentDeSerializer.cs
- IntegerCollectionEditor.cs
- ComEventsInfo.cs
- ListItem.cs
- ValueQuery.cs
- TrackingSection.cs
- ObjectConverter.cs
- OdbcConnection.cs
- CompModSwitches.cs
- _DisconnectOverlappedAsyncResult.cs
- DataControlFieldCollection.cs
- cookieexception.cs
- BooleanAnimationBase.cs
- CorePropertiesFilter.cs
- VirtualPathProvider.cs
- XamlTypeMapper.cs
- RectAnimation.cs
- Char.cs
- NavigationHelper.cs
- GridView.cs
- OdbcConnection.cs
- UnsafeNativeMethods.cs
- sqlser.cs
- CacheOutputQuery.cs
- DotNetATv1WindowsLogEntrySerializer.cs
- AnimatedTypeHelpers.cs
- WebEvents.cs
- CapabilitiesState.cs
- RedirectionProxy.cs
- FieldBuilder.cs
- StrokeRenderer.cs
- RangeValuePatternIdentifiers.cs
- DiscoveryMessageSequence11.cs
- RowSpanVector.cs
- CheckBox.cs
- ScopedMessagePartSpecification.cs
- TextUtf8RawTextWriter.cs
- EntityClientCacheKey.cs
- KnownTypes.cs
- WaitHandle.cs
- TTSEvent.cs
- DataServiceHostFactory.cs
- CommandCollectionEditor.cs
- SQLInt16Storage.cs
- QilNode.cs
- _ListenerAsyncResult.cs
- NativeCppClassAttribute.cs
- Package.cs
- KoreanLunisolarCalendar.cs
- KeyConstraint.cs
- FileUtil.cs
- XsltSettings.cs
- ConfigXmlElement.cs
- SecurityHeader.cs
- EventPrivateKey.cs
- OdbcHandle.cs
- HierarchicalDataSourceControl.cs
- PageAsyncTaskManager.cs
- altserialization.cs
- DockingAttribute.cs
- StylusButton.cs
- SqlUtil.cs
- EastAsianLunisolarCalendar.cs
- WpfXamlLoader.cs
- CustomErrorsSection.cs
- FloatSumAggregationOperator.cs
- VoiceSynthesis.cs
- EventMappingSettingsCollection.cs
- TableSectionStyle.cs
- DataGridViewCellStyleEditor.cs
- ChangesetResponse.cs
- CellTreeNode.cs
- objectquery_tresulttype.cs
- AuthorizationSection.cs
- CapabilitiesPattern.cs
- ImageCodecInfoPrivate.cs
- PngBitmapEncoder.cs
- Trigger.cs
- SmiXetterAccessMap.cs
- HttpModuleAction.cs
- StatusStrip.cs
- StorageFunctionMapping.cs
- IItemProperties.cs
- XPathQilFactory.cs
- InkCanvasSelection.cs
- WebEventCodes.cs
- XmlSerializationReader.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- RowBinding.cs
- externdll.cs
- GACMembershipCondition.cs
- IsolatedStoragePermission.cs
- ISAPIWorkerRequest.cs
- DBSchemaRow.cs
- DataServiceClientException.cs
- fixedPageContentExtractor.cs
- StsCommunicationException.cs
- Scene3D.cs
- AspNetHostingPermission.cs