Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- QilChoice.cs
- ExtendedProtectionPolicyTypeConverter.cs
- TokenBasedSetEnumerator.cs
- ConsumerConnectionPoint.cs
- RawUIStateInputReport.cs
- StructuredTypeInfo.cs
- SingleObjectCollection.cs
- EdmPropertyAttribute.cs
- OdbcErrorCollection.cs
- XmlDataSourceView.cs
- BCryptSafeHandles.cs
- DoubleAnimationBase.cs
- ManageRequest.cs
- BuildProviderUtils.cs
- DbCommandDefinition.cs
- WSTrustDec2005.cs
- IOException.cs
- ExpressionBuilder.cs
- Rect3DValueSerializer.cs
- SmtpNegotiateAuthenticationModule.cs
- SqlBuffer.cs
- StorageBasedPackageProperties.cs
- TypedTableBase.cs
- ConnectionsZone.cs
- SequentialWorkflowHeaderFooter.cs
- ViewStateException.cs
- DashStyles.cs
- followingsibling.cs
- GenericWebPart.cs
- WebBrowserEvent.cs
- ExpandSegmentCollection.cs
- ASCIIEncoding.cs
- COM2ExtendedUITypeEditor.cs
- TypeExtension.cs
- IArgumentProvider.cs
- TextModifierScope.cs
- OleStrCAMarshaler.cs
- MasterPageBuildProvider.cs
- WebPartAuthorizationEventArgs.cs
- CachedPathData.cs
- SqlBuilder.cs
- SafeReadContext.cs
- OnOperation.cs
- SelectorItemAutomationPeer.cs
- WmlMobileTextWriter.cs
- TypefaceMap.cs
- PageParserFilter.cs
- FrameworkReadOnlyPropertyMetadata.cs
- CatalogPartChrome.cs
- dataprotectionpermission.cs
- TableRow.cs
- DataSourceXmlClassAttribute.cs
- DescriptionAttribute.cs
- StorageComplexTypeMapping.cs
- RayMeshGeometry3DHitTestResult.cs
- _SslStream.cs
- DataSourceIDConverter.cs
- DbTransaction.cs
- TableLayoutPanelCodeDomSerializer.cs
- XmlValidatingReaderImpl.cs
- DropDownList.cs
- MsmqIntegrationBinding.cs
- InfoCardCryptoHelper.cs
- LogConverter.cs
- ContentWrapperAttribute.cs
- TcpAppDomainProtocolHandler.cs
- LazyTextWriterCreator.cs
- BatchStream.cs
- BufferBuilder.cs
- ConfigurationSettings.cs
- SoapFault.cs
- ProfileSettingsCollection.cs
- WebPartsPersonalizationAuthorization.cs
- SQLDoubleStorage.cs
- ComboBoxRenderer.cs
- AnnotationDocumentPaginator.cs
- UnderstoodHeaders.cs
- cache.cs
- TextTreeTextNode.cs
- GPRECTF.cs
- WebHttpBindingElement.cs
- SecurityTokenRequirement.cs
- EmptyEnumerator.cs
- SingleConverter.cs
- HttpClientCertificate.cs
- DataControlHelper.cs
- ItemCheckedEvent.cs
- DataControlPagerLinkButton.cs
- SchemaElementDecl.cs
- GiveFeedbackEventArgs.cs
- ListBox.cs
- MissingMethodException.cs
- BitmapEffectCollection.cs
- PermissionRequestEvidence.cs
- EventLogQuery.cs
- BufferedStream2.cs
- ResourceContainer.cs
- MarkupCompilePass1.cs
- Subtree.cs
- BinaryObjectReader.cs