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
- ExpressionVisitorHelpers.cs
- WindowsFormsHostAutomationPeer.cs
- EntitySqlQueryCacheEntry.cs
- MimeReturn.cs
- TypeTypeConverter.cs
- ParameterBinding.cs
- MembershipPasswordException.cs
- ConfigXmlDocument.cs
- LocalizableAttribute.cs
- BufferModesCollection.cs
- IRCollection.cs
- GrammarBuilderDictation.cs
- CapabilitiesSection.cs
- Dispatcher.cs
- EntityKey.cs
- OpenTypeCommon.cs
- DayRenderEvent.cs
- OracleConnectionFactory.cs
- InvalidateEvent.cs
- ValidationRuleCollection.cs
- assemblycache.cs
- isolationinterop.cs
- AtomServiceDocumentSerializer.cs
- PathSegmentCollection.cs
- MutexSecurity.cs
- Line.cs
- GridViewActionList.cs
- CallbackValidator.cs
- DesignerActionUIService.cs
- SynchronizationValidator.cs
- ImageClickEventArgs.cs
- BamlResourceDeserializer.cs
- TextHintingModeValidation.cs
- Journal.cs
- Light.cs
- DbModificationCommandTree.cs
- DeobfuscatingStream.cs
- ElapsedEventArgs.cs
- Win32KeyboardDevice.cs
- TraceSection.cs
- Constraint.cs
- Command.cs
- EncryptedData.cs
- VirtualPathProvider.cs
- XmlAnyElementAttributes.cs
- SkinBuilder.cs
- MouseGestureValueSerializer.cs
- SequentialActivityDesigner.cs
- ScriptManagerProxy.cs
- Atom10ItemFormatter.cs
- hwndwrapper.cs
- InternalConfigRoot.cs
- FlowchartStart.xaml.cs
- WinFormsComponentEditor.cs
- TogglePatternIdentifiers.cs
- __Filters.cs
- Stylesheet.cs
- XPathSelectionIterator.cs
- Types.cs
- AdvancedBindingEditor.cs
- AggregateNode.cs
- HashCodeCombiner.cs
- PenLineJoinValidation.cs
- HttpClientCredentialType.cs
- MultilineStringConverter.cs
- ParagraphResult.cs
- ThicknessAnimationBase.cs
- FontDriver.cs
- CfgRule.cs
- UriTemplate.cs
- ObjectConverter.cs
- DataGridCommandEventArgs.cs
- ArrayList.cs
- OrderedDictionaryStateHelper.cs
- OleDbDataReader.cs
- CreateUserWizardDesigner.cs
- DataControlHelper.cs
- ManagedWndProcTracker.cs
- AppendHelper.cs
- ObjectDataSourceDisposingEventArgs.cs
- InternalCache.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- StreamWriter.cs
- SqlUtil.cs
- CollectionContainer.cs
- DeviceContext2.cs
- ComponentManagerBroker.cs
- XmlBinaryReader.cs
- SignatureToken.cs
- SiteMapPathDesigner.cs
- ByteStorage.cs
- LocalizationParserHooks.cs
- CustomErrorsSectionWrapper.cs
- AssertFilter.cs
- DirectionalLight.cs
- processwaithandle.cs
- MenuItemBindingCollection.cs
- SequenceNumber.cs
- GrammarBuilderDictation.cs
- GuidTagList.cs