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
- SqlParameterCollection.cs
- ContainerParagraph.cs
- Label.cs
- JpegBitmapDecoder.cs
- MachineSettingsSection.cs
- Win32.cs
- HwndProxyElementProvider.cs
- input.cs
- Int16Storage.cs
- RelatedEnd.cs
- ConfigurationFileMap.cs
- ConfigurationSection.cs
- Rectangle.cs
- PageCatalogPart.cs
- hresults.cs
- EncryptedReference.cs
- SuppressMergeCheckAttribute.cs
- BrowserDefinition.cs
- TcpProcessProtocolHandler.cs
- PolyBezierSegmentFigureLogic.cs
- TypeConverters.cs
- ListBoxItem.cs
- AutoResizedEvent.cs
- DefaultTraceListener.cs
- TraceSection.cs
- IntSecurity.cs
- EventListener.cs
- SerializationInfo.cs
- ProjectionRewriter.cs
- IconHelper.cs
- DragDrop.cs
- CngProperty.cs
- RenderData.cs
- StringInfo.cs
- XmlSignatureManifest.cs
- ProcessModuleCollection.cs
- CodeNamespaceCollection.cs
- Exceptions.cs
- PropertyGridCommands.cs
- DiagnosticEventProvider.cs
- VBCodeProvider.cs
- invalidudtexception.cs
- PropertiesTab.cs
- BevelBitmapEffect.cs
- PositiveTimeSpanValidatorAttribute.cs
- CompilerHelpers.cs
- EntityProviderFactory.cs
- DataGridHeaderBorder.cs
- ReadOnlyHierarchicalDataSourceView.cs
- SqlCommand.cs
- ListControl.cs
- WindowsSysHeader.cs
- SafeThemeHandle.cs
- StrokeDescriptor.cs
- RegisteredHiddenField.cs
- DynamicActionMessageFilter.cs
- DecoderFallbackWithFailureFlag.cs
- ClientSponsor.cs
- SerializableAuthorizationContext.cs
- Point3DAnimationUsingKeyFrames.cs
- SchemaAttDef.cs
- MediaContextNotificationWindow.cs
- DateTimeConverter2.cs
- RadioButtonFlatAdapter.cs
- PackagingUtilities.cs
- Axis.cs
- Viewport3DAutomationPeer.cs
- Trigger.cs
- CheckBoxRenderer.cs
- EncryptedReference.cs
- TextServicesCompartmentEventSink.cs
- QilLiteral.cs
- UdpChannelFactory.cs
- SqlDataSource.cs
- BypassElement.cs
- ZipIOExtraField.cs
- _FixedSizeReader.cs
- MergeEnumerator.cs
- Paragraph.cs
- LineGeometry.cs
- Section.cs
- ObservableDictionary.cs
- StreamingContext.cs
- AsyncPostBackErrorEventArgs.cs
- NumberFormatInfo.cs
- WaitForChangedResult.cs
- ControlPropertyNameConverter.cs
- ImportOptions.cs
- CharacterBuffer.cs
- MobileControlDesigner.cs
- RSAPKCS1SignatureDeformatter.cs
- ChangePassword.cs
- GetPageNumberCompletedEventArgs.cs
- EventWaitHandle.cs
- LinkConverter.cs
- TdsValueSetter.cs
- SafeCryptoHandles.cs
- OracleString.cs
- HWStack.cs
- DynamicControlParameter.cs