Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataWebControlsDesign / System / Data / WebControls / Design / EntityDesignerDataSourceView.cs / 1305376 / 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
- IdentifierService.cs
- SessionStateItemCollection.cs
- SystemEvents.cs
- DescendantOverDescendantQuery.cs
- MaskedTextProvider.cs
- TextBox.cs
- TraceRecords.cs
- DynamicValueConverter.cs
- NameValueCache.cs
- ByteAnimationUsingKeyFrames.cs
- NumberEdit.cs
- CapabilitiesAssignment.cs
- FileLevelControlBuilderAttribute.cs
- ErrorFormatterPage.cs
- ReadOnlyDataSource.cs
- Normalization.cs
- EntityDataSourceReferenceGroup.cs
- StatusBar.cs
- CompositeDataBoundControl.cs
- TemplateControl.cs
- ListItemCollection.cs
- ADConnectionHelper.cs
- WizardPanelChangingEventArgs.cs
- ErrorFormatter.cs
- XmlIterators.cs
- PublisherMembershipCondition.cs
- HotSpotCollection.cs
- VideoDrawing.cs
- ToolStripDropDownDesigner.cs
- RoutingBehavior.cs
- DesignerSerializerAttribute.cs
- TypeLibConverter.cs
- UIElement3DAutomationPeer.cs
- RichTextBox.cs
- AuthenticationModuleElement.cs
- SelectionProviderWrapper.cs
- BitmapDownload.cs
- RtfToXamlReader.cs
- LowerCaseStringConverter.cs
- XmlQueryRuntime.cs
- StorageSetMapping.cs
- LinqDataSourceView.cs
- GeneralTransform3DGroup.cs
- X509ChainPolicy.cs
- LifetimeMonitor.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- CalendarDataBindingHandler.cs
- DataGridViewCellPaintingEventArgs.cs
- DrawingDrawingContext.cs
- TextParagraph.cs
- DataGridViewMethods.cs
- MessageQuerySet.cs
- FontFamilyIdentifier.cs
- DotExpr.cs
- CanonicalFontFamilyReference.cs
- DataPager.cs
- FilterEventArgs.cs
- XdrBuilder.cs
- CodeArrayCreateExpression.cs
- BamlCollectionHolder.cs
- NumericUpDownAccelerationCollection.cs
- TokenBasedSet.cs
- RegistrySecurity.cs
- ISAPIWorkerRequest.cs
- RuntimeConfigurationRecord.cs
- MdImport.cs
- InlinedLocationReference.cs
- EventData.cs
- CodeCompileUnit.cs
- ExeContext.cs
- CompiledAction.cs
- EventData.cs
- COAUTHIDENTITY.cs
- StdRegProviderWrapper.cs
- WebPartsPersonalization.cs
- TextTreeInsertUndoUnit.cs
- OdbcConnectionHandle.cs
- ManualResetEventSlim.cs
- Compilation.cs
- TextElementEditingBehaviorAttribute.cs
- AdRotator.cs
- LocatorPartList.cs
- ExtractedStateEntry.cs
- CdpEqualityComparer.cs
- RectangleGeometry.cs
- PreservationFileWriter.cs
- RequestNavigateEventArgs.cs
- QueryOpcode.cs
- PresentationSource.cs
- ZipIOModeEnforcingStream.cs
- ClientScriptManager.cs
- InputMethod.cs
- MetadataCollection.cs
- BooleanFunctions.cs
- Span.cs
- HtmlTable.cs
- SingleQueryOperator.cs
- ViewBase.cs
- Normalization.cs
- Attributes.cs