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
- DataGridPageChangedEventArgs.cs
- XmlBoundElement.cs
- BinaryKeyIdentifierClause.cs
- StyleCollectionEditor.cs
- NullableIntAverageAggregationOperator.cs
- XmlAttributeAttribute.cs
- DragStartedEventArgs.cs
- RegularExpressionValidator.cs
- ClientRequest.cs
- RenderOptions.cs
- Oid.cs
- HTMLTagNameToTypeMapper.cs
- StringWriter.cs
- SaveWorkflowCommand.cs
- RedBlackList.cs
- FontInfo.cs
- SamlAction.cs
- AutoResetEvent.cs
- Latin1Encoding.cs
- ListDictionaryInternal.cs
- ELinqQueryState.cs
- CharacterString.cs
- Table.cs
- SHA512.cs
- ColorAnimation.cs
- FileVersion.cs
- DefaultDiscoveryServiceExtension.cs
- Pair.cs
- WindowsTitleBar.cs
- DependentTransaction.cs
- Tracking.cs
- TreeWalker.cs
- ApplicationDirectory.cs
- TextBoxAutoCompleteSourceConverter.cs
- MenuCommands.cs
- IListConverters.cs
- LazyInitializer.cs
- ElementUtil.cs
- PropertyChangedEventManager.cs
- SecUtil.cs
- WorkflowClientDeliverMessageWrapper.cs
- ReadWriteControlDesigner.cs
- ByteConverter.cs
- ToolStripContentPanelDesigner.cs
- UITypeEditor.cs
- ResXBuildProvider.cs
- TraceUtility.cs
- Int64Storage.cs
- ProfileModule.cs
- basevalidator.cs
- ZipIOBlockManager.cs
- PeerServiceMessageContracts.cs
- InstanceDescriptor.cs
- ContainerFilterService.cs
- XMLSchema.cs
- ValueQuery.cs
- ReadOnlyMetadataCollection.cs
- Selector.cs
- QilStrConcat.cs
- ContentTextAutomationPeer.cs
- BasePropertyDescriptor.cs
- MultiTrigger.cs
- Visitors.cs
- BaseAsyncResult.cs
- DataProtection.cs
- ApplicationContext.cs
- DataFormat.cs
- StringCollection.cs
- ProxyWebPartManagerDesigner.cs
- LogEntryUtils.cs
- ReadOnlyDataSourceView.cs
- SiteIdentityPermission.cs
- KnownBoxes.cs
- Error.cs
- DocumentsTrace.cs
- TextBox.cs
- DBBindings.cs
- DesignerVerb.cs
- HtmlGenericControl.cs
- ItemsControlAutomationPeer.cs
- SqlBuffer.cs
- SchemaNamespaceManager.cs
- HostingMessageProperty.cs
- TraceFilter.cs
- BlurBitmapEffect.cs
- InstanceOwnerException.cs
- DivideByZeroException.cs
- WebZone.cs
- HttpListenerException.cs
- XmlSchemaSimpleContentExtension.cs
- DataGridCellsPresenter.cs
- DirectoryInfo.cs
- GenericXmlSecurityTokenAuthenticator.cs
- DataKey.cs
- ApplicationManager.cs
- DataViewSetting.cs
- UntypedNullExpression.cs
- ResponseBodyWriter.cs
- OverflowException.cs
- XmlSchemaSet.cs