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
- SqlClientFactory.cs
- DynamicDocumentPaginator.cs
- DataGridViewCellValidatingEventArgs.cs
- FormViewDeleteEventArgs.cs
- HtmlTableCellCollection.cs
- EdmEntityTypeAttribute.cs
- BrowserTree.cs
- FileNameEditor.cs
- hwndwrapper.cs
- FieldToken.cs
- BitmapPalettes.cs
- InvokeProviderWrapper.cs
- ThicknessKeyFrameCollection.cs
- SamlNameIdentifierClaimResource.cs
- EmbeddedMailObjectsCollection.cs
- PackageRelationship.cs
- EqualityComparer.cs
- WebServiceTypeData.cs
- JsonDeserializer.cs
- SystemWebCachingSectionGroup.cs
- StyleXamlParser.cs
- CommandHelper.cs
- WebPartZoneBase.cs
- HttpRawResponse.cs
- CodeBlockBuilder.cs
- DictionarySectionHandler.cs
- ServiceModelStringsVersion1.cs
- WindowsTab.cs
- StringUtil.cs
- ObjectListGeneralPage.cs
- DynamicDataManager.cs
- TemplatedMailWebEventProvider.cs
- EarlyBoundInfo.cs
- DbConnectionPoolGroupProviderInfo.cs
- Script.cs
- DataGridColumnsPage.cs
- ComponentChangedEvent.cs
- CheckBoxList.cs
- StorageTypeMapping.cs
- SinglePhaseEnlistment.cs
- DocumentPageHost.cs
- StyleCollection.cs
- HandlerBase.cs
- CheckBoxFlatAdapter.cs
- CacheManager.cs
- OdbcHandle.cs
- LabelInfo.cs
- BlurEffect.cs
- LinkArea.cs
- ExportOptions.cs
- MethodBody.cs
- DataGridItemCollection.cs
- DictionaryManager.cs
- EventProviderWriter.cs
- Gdiplus.cs
- StagingAreaInputItem.cs
- WbemException.cs
- PropertyGridCommands.cs
- DeviceContexts.cs
- DataSvcMapFileSerializer.cs
- IdentityNotMappedException.cs
- LinqDataSource.cs
- NoPersistProperty.cs
- OdbcConnectionFactory.cs
- DataControlLinkButton.cs
- DocumentViewer.cs
- ClientEventManager.cs
- PlacementWorkspace.cs
- NativeMethods.cs
- ValidationErrorInfo.cs
- Object.cs
- Border.cs
- ResourceExpressionBuilder.cs
- ScriptResourceInfo.cs
- TriggerAction.cs
- SafeRegistryHandle.cs
- ExpressionPrefixAttribute.cs
- WebBaseEventKeyComparer.cs
- StickyNoteHelper.cs
- ParseHttpDate.cs
- SamlSubject.cs
- ButtonBase.cs
- OracleCommandBuilder.cs
- TileBrush.cs
- PanningMessageFilter.cs
- Scripts.cs
- CodeDefaultValueExpression.cs
- ContentTextAutomationPeer.cs
- Guid.cs
- CrossContextChannel.cs
- SmiConnection.cs
- WindowsIdentity.cs
- ProxyWebPart.cs
- ReverseInheritProperty.cs
- SQLMoney.cs
- PaperSource.cs
- UserControlFileEditor.cs
- WebPartDeleteVerb.cs
- ToolStripManager.cs
- WinFormsUtils.cs