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
- OutputChannel.cs
- DataGridViewRow.cs
- Query.cs
- TransformerConfigurationWizardBase.cs
- WebContext.cs
- IsolatedStorage.cs
- AdCreatedEventArgs.cs
- ExceptionHandlersDesigner.cs
- Light.cs
- XmlChildNodes.cs
- TextDecorations.cs
- DbCommandTree.cs
- AnnotationHelper.cs
- _HeaderInfo.cs
- PropertyChangedEventArgs.cs
- OutOfProcStateClientManager.cs
- UncommonField.cs
- ResolveResponseInfo.cs
- CodeMemberProperty.cs
- XPathSingletonIterator.cs
- DescendantQuery.cs
- UpdateExpressionVisitor.cs
- MimeTypeAttribute.cs
- ToolStripArrowRenderEventArgs.cs
- DataGridParentRows.cs
- RuntimeWrappedException.cs
- DataGridViewRowsRemovedEventArgs.cs
- MediaElementAutomationPeer.cs
- Resources.Designer.cs
- GeneralTransformGroup.cs
- MouseGestureValueSerializer.cs
- DateTimeParse.cs
- AsymmetricAlgorithm.cs
- SyndicationContent.cs
- Italic.cs
- RadioButtonList.cs
- XmlSchemaElement.cs
- MimeReflector.cs
- AliasedSlot.cs
- TypeSemantics.cs
- DbModificationClause.cs
- XsltQilFactory.cs
- PerfCounters.cs
- Stopwatch.cs
- UshortList2.cs
- RoutedEventArgs.cs
- ConfigurationValues.cs
- WebPartsSection.cs
- SoapAttributeAttribute.cs
- Funcletizer.cs
- ChangeConflicts.cs
- cookiecontainer.cs
- Itemizer.cs
- TypeLoader.cs
- VSWCFServiceContractGenerator.cs
- MSAANativeProvider.cs
- XmlSchemaSimpleContentExtension.cs
- DataGridHyperlinkColumn.cs
- XmlDocumentFragment.cs
- ZeroOpNode.cs
- LingerOption.cs
- ToolStripEditorManager.cs
- SystemColorTracker.cs
- DependencyPropertyHelper.cs
- DeploymentSectionCache.cs
- ITextView.cs
- IISUnsafeMethods.cs
- UserInitiatedNavigationPermission.cs
- PolicyChain.cs
- DBCommandBuilder.cs
- PenCursorManager.cs
- DirectoryRedirect.cs
- CacheManager.cs
- SecurityDocument.cs
- Formatter.cs
- XmlHierarchicalDataSourceView.cs
- UriPrefixTable.cs
- __FastResourceComparer.cs
- DesignSurfaceManager.cs
- RuntimeWrappedException.cs
- BuildProviderCollection.cs
- StateRuntime.cs
- NativeMethods.cs
- RpcCryptoRequest.cs
- JavaScriptString.cs
- ThreadStaticAttribute.cs
- sqlnorm.cs
- WebPartsPersonalizationAuthorization.cs
- SmtpFailedRecipientsException.cs
- NetWebProxyFinder.cs
- AutomationAttributeInfo.cs
- SoapObjectInfo.cs
- ReverseQueryOperator.cs
- _CommandStream.cs
- ButtonStandardAdapter.cs
- NativeMethods.cs
- FixedTextContainer.cs
- CommonProperties.cs
- DbQueryCommandTree.cs
- ExceptionValidationRule.cs