Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataWebControlsDesign / System / Data / WebControls / Design / EntityDesignerDataSourceView.cs / 2 / 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
- SchemaTableColumn.cs
- XamlTypeMapper.cs
- PolicyManager.cs
- SectionRecord.cs
- PropertyToken.cs
- VectorCollectionConverter.cs
- AlternateViewCollection.cs
- ButtonAutomationPeer.cs
- SettingsPropertyCollection.cs
- ExpressionBuilder.cs
- ReadOnlyDataSource.cs
- MimeWriter.cs
- TraceHwndHost.cs
- PublishLicense.cs
- EndPoint.cs
- InstallerTypeAttribute.cs
- TypeInfo.cs
- DSGeneratorProblem.cs
- SecureStringHasher.cs
- ToolStripMenuItem.cs
- PersistenceTypeAttribute.cs
- ScriptManager.cs
- WebPartsPersonalization.cs
- CodeStatementCollection.cs
- QfeChecker.cs
- TextLineResult.cs
- WebControlsSection.cs
- ProcessHostServerConfig.cs
- WebPartTransformerCollection.cs
- TemplatedWizardStep.cs
- AccessDataSource.cs
- _FtpDataStream.cs
- ValueQuery.cs
- SizeConverter.cs
- TextBox.cs
- PipelineModuleStepContainer.cs
- ComboBoxAutomationPeer.cs
- Expander.cs
- DirectoryInfo.cs
- x509utils.cs
- x509store.cs
- Collection.cs
- SelectorItemAutomationPeer.cs
- HiddenField.cs
- Convert.cs
- SystemTcpConnection.cs
- ErrorRuntimeConfig.cs
- SignedPkcs7.cs
- ConnectorSelectionGlyph.cs
- GridErrorDlg.cs
- TextStore.cs
- LinqDataSourceHelper.cs
- CompilerWrapper.cs
- XmlCharCheckingWriter.cs
- SectionUpdates.cs
- StackBuilderSink.cs
- DBDataPermission.cs
- RequestStatusBarUpdateEventArgs.cs
- TableLayoutColumnStyleCollection.cs
- ConfigViewGenerator.cs
- UIElementHelper.cs
- ErrorWrapper.cs
- XsdBuildProvider.cs
- MergePropertyDescriptor.cs
- BaseValidator.cs
- ObservableDictionary.cs
- __FastResourceComparer.cs
- FileDialogCustomPlacesCollection.cs
- ParameterCollectionEditor.cs
- DropDownButton.cs
- OLEDB_Enum.cs
- Renderer.cs
- InvalidComObjectException.cs
- ListControlConvertEventArgs.cs
- BindableTemplateBuilder.cs
- CompiledQuery.cs
- Int64Storage.cs
- CodeEventReferenceExpression.cs
- ListViewDeletedEventArgs.cs
- RelatedImageListAttribute.cs
- WebPartEventArgs.cs
- ObjectToIdCache.cs
- ArrayEditor.cs
- OwnerDrawPropertyBag.cs
- MailHeaderInfo.cs
- XmlDocument.cs
- CacheDependency.cs
- XmlTextEncoder.cs
- Calendar.cs
- OptimalTextSource.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- HighlightComponent.cs
- ScriptIgnoreAttribute.cs
- QueuePathEditor.cs
- ClientSettings.cs
- InvalidWMPVersionException.cs
- QuadraticBezierSegment.cs
- UdpDiscoveryMessageFilter.cs
- SrgsNameValueTag.cs
- FormatterConverter.cs