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
- OdbcConnection.cs
- DesignerView.cs
- followingsibling.cs
- RegionIterator.cs
- PeerNearMe.cs
- RootBrowserWindow.cs
- OperationAbortedException.cs
- SamlSubject.cs
- EllipticalNodeOperations.cs
- InternalConfirm.cs
- ContentIterators.cs
- EventTrigger.cs
- WebPermission.cs
- StandardOleMarshalObject.cs
- ContainerParaClient.cs
- AsyncContentLoadedEventArgs.cs
- XmlException.cs
- PositiveTimeSpanValidator.cs
- DataColumnChangeEvent.cs
- TouchesCapturedWithinProperty.cs
- DateRangeEvent.cs
- SHA256Managed.cs
- XmlSchemaValidationException.cs
- XPathDocumentIterator.cs
- MembershipAdapter.cs
- HwndSubclass.cs
- LabelDesigner.cs
- ResourceDescriptionAttribute.cs
- RTLAwareMessageBox.cs
- WorkflowTransactionService.cs
- SessionIDManager.cs
- FormatException.cs
- _ContextAwareResult.cs
- FixedElement.cs
- InputLanguage.cs
- XPSSignatureDefinition.cs
- DateTimeSerializationSection.cs
- TextSegment.cs
- Cursors.cs
- BitmapSourceSafeMILHandle.cs
- CachedCompositeFamily.cs
- xmlfixedPageInfo.cs
- ContactManager.cs
- SamlDoNotCacheCondition.cs
- WinEventTracker.cs
- RoleManagerEventArgs.cs
- Query.cs
- VisemeEventArgs.cs
- SimpleHandlerFactory.cs
- SortedDictionary.cs
- SyndicationItemFormatter.cs
- TextTreeExtractElementUndoUnit.cs
- ArraySubsetEnumerator.cs
- DynamicPropertyHolder.cs
- IFormattable.cs
- XmlCompatibilityReader.cs
- RowVisual.cs
- VScrollProperties.cs
- RelationalExpressions.cs
- ExpressionServices.cs
- CellConstantDomain.cs
- UnhandledExceptionEventArgs.cs
- Odbc32.cs
- MaterialGroup.cs
- TCEAdapterGenerator.cs
- XamlStyleSerializer.cs
- WindowsListBox.cs
- DataFormats.cs
- GridViewUpdatedEventArgs.cs
- DesignBinding.cs
- AttributeProviderAttribute.cs
- XmlAnyElementAttribute.cs
- GlobalItem.cs
- HtmlShimManager.cs
- PropertyDescriptorComparer.cs
- XmlSchemaImport.cs
- ToolStripMenuItem.cs
- JoinCqlBlock.cs
- BitStream.cs
- SimpleWebHandlerParser.cs
- PersonalizationDictionary.cs
- WsatStrings.cs
- GlyphInfoList.cs
- Rotation3DAnimationUsingKeyFrames.cs
- Helpers.cs
- ChildrenQuery.cs
- HitTestParameters3D.cs
- httpstaticobjectscollection.cs
- SecureStringHasher.cs
- SmtpSection.cs
- RegexStringValidator.cs
- TextBoxAutoCompleteSourceConverter.cs
- _ShellExpression.cs
- LogExtent.cs
- SpotLight.cs
- SqlFacetAttribute.cs
- DataBinding.cs
- ISO2022Encoding.cs
- EffectiveValueEntry.cs
- SystemDiagnosticsSection.cs