Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / ndp / fx / src / DataWebControlsDesign / System / Data / WebControls / Design / EntityDesignerDataSourceView.cs / 1 / 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
- CompilationSection.cs
- Oid.cs
- httpserverutility.cs
- TextEditorMouse.cs
- FormViewUpdateEventArgs.cs
- Int32Collection.cs
- ButtonPopupAdapter.cs
- CodeConditionStatement.cs
- MouseWheelEventArgs.cs
- OdbcPermission.cs
- FacetDescriptionElement.cs
- WebAdminConfigurationHelper.cs
- ResXDataNode.cs
- WindowsServiceCredential.cs
- CryptoHelper.cs
- VirtualPath.cs
- QueryCacheKey.cs
- DeflateStreamAsyncResult.cs
- DesignerEditorPartChrome.cs
- SystemIPInterfaceProperties.cs
- AccessorTable.cs
- ADConnectionHelper.cs
- DbDataAdapter.cs
- SQLInt64.cs
- OutOfProcStateClientManager.cs
- IdentityModelDictionary.cs
- HostingPreferredMapPath.cs
- SoapAttributeAttribute.cs
- MruCache.cs
- WbmpConverter.cs
- ICspAsymmetricAlgorithm.cs
- XmlReflectionImporter.cs
- Path.cs
- HandleRef.cs
- ErrorWrapper.cs
- NamespaceInfo.cs
- PageContent.cs
- Win32.cs
- ArrayConverter.cs
- DynamicValidatorEventArgs.cs
- ObjectListCommand.cs
- EntityStoreSchemaFilterEntry.cs
- Avt.cs
- XmlQualifiedNameTest.cs
- ConnectionInterfaceCollection.cs
- XmlLanguage.cs
- TraceProvider.cs
- DbUpdateCommandTree.cs
- SecurityManager.cs
- DataSourceGeneratorException.cs
- GroupStyle.cs
- SiteMembershipCondition.cs
- HttpRequest.cs
- RemotingException.cs
- WebPartHeaderCloseVerb.cs
- DbConnectionStringCommon.cs
- ClientClassGenerator.cs
- DragCompletedEventArgs.cs
- CheckPair.cs
- PartialCachingControl.cs
- LogSwitch.cs
- SchemaDeclBase.cs
- DateTimeOffset.cs
- CleanUpVirtualizedItemEventArgs.cs
- AssemblyCache.cs
- XpsColorContext.cs
- SqlTriggerAttribute.cs
- AmbientValueAttribute.cs
- DeploymentExceptionMapper.cs
- EdmProperty.cs
- XmlDocumentViewSchema.cs
- MethodBuilderInstantiation.cs
- ProfessionalColorTable.cs
- InternalTypeHelper.cs
- SspiSafeHandles.cs
- WindowsUpDown.cs
- MappingItemCollection.cs
- SqlTriggerAttribute.cs
- PointLight.cs
- Pick.cs
- ExtendedPropertyDescriptor.cs
- ScriptResourceHandler.cs
- ToolboxBitmapAttribute.cs
- ToolStripDropTargetManager.cs
- CustomErrorsSection.cs
- ZoneLinkButton.cs
- TemplateControlCodeDomTreeGenerator.cs
- DiscoveryExceptionDictionary.cs
- TextTreeRootNode.cs
- DataColumn.cs
- LinkClickEvent.cs
- SiteMapNodeItemEventArgs.cs
- MostlySingletonList.cs
- Soap.cs
- SymLanguageVendor.cs
- IndexingContentUnit.cs
- HostDesigntimeLicenseContext.cs
- XmlReader.cs
- TypeUtil.cs
- TextTreeInsertElementUndoUnit.cs