Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- PrintDialog.cs
- UpdatePanelControlTrigger.cs
- NativeMethods.cs
- SortedList.cs
- ProxyAttribute.cs
- CustomUserNameSecurityTokenAuthenticator.cs
- NotFiniteNumberException.cs
- IndexedSelectQueryOperator.cs
- IndentedWriter.cs
- HtmlImageAdapter.cs
- ElementNotAvailableException.cs
- BitmapEffectCollection.cs
- SqlBooleanMismatchVisitor.cs
- FontCollection.cs
- EventHandlerService.cs
- StyleBamlRecordReader.cs
- ReadOnlyDataSource.cs
- ReferenceService.cs
- ContextMenuStrip.cs
- SourceItem.cs
- DependencyObject.cs
- LifetimeServices.cs
- TextMarkerSource.cs
- TrackingMemoryStreamFactory.cs
- PartialCachingControl.cs
- ActivityTypeCodeDomSerializer.cs
- DataConnectionHelper.cs
- EmptyCollection.cs
- XmlTextReaderImplHelpers.cs
- KeyManager.cs
- VersionPair.cs
- ListSortDescription.cs
- DeobfuscatingStream.cs
- TextReturnReader.cs
- ContainerParaClient.cs
- ComboBox.cs
- WebPartEditorApplyVerb.cs
- ImplicitInputBrush.cs
- MemoryPressure.cs
- Types.cs
- NetStream.cs
- KeyConstraint.cs
- FileClassifier.cs
- XPathChildIterator.cs
- ClosableStream.cs
- WindowsAltTab.cs
- Vector3DConverter.cs
- ComponentDesigner.cs
- RepeaterDesigner.cs
- SmiSettersStream.cs
- OneOfConst.cs
- Add.cs
- DataGridItemEventArgs.cs
- EventMap.cs
- FunctionQuery.cs
- ButtonBase.cs
- ToolStripSplitStackLayout.cs
- UIElementParagraph.cs
- XamlSerializerUtil.cs
- NetDataContractSerializer.cs
- UnmanagedBitmapWrapper.cs
- RuntimeCompatibilityAttribute.cs
- Animatable.cs
- ZoneMembershipCondition.cs
- WaitHandle.cs
- ResourceCategoryAttribute.cs
- Method.cs
- DependentList.cs
- TempFiles.cs
- DiagnosticsConfigurationHandler.cs
- StaticSiteMapProvider.cs
- DataMemberConverter.cs
- TypeReference.cs
- SimpleMailWebEventProvider.cs
- RemoteEndpointMessageProperty.cs
- HttpStreams.cs
- MailHeaderInfo.cs
- RelatedImageListAttribute.cs
- SystemColorTracker.cs
- AssociationSetEnd.cs
- RijndaelManaged.cs
- DataControlButton.cs
- WebPartConnectionsCancelEventArgs.cs
- ResourcesGenerator.cs
- WindowsFormsLinkLabel.cs
- Operators.cs
- CompilationSection.cs
- EncoderParameters.cs
- QueryOptionExpression.cs
- RadioButton.cs
- CryptoApi.cs
- NullableLongSumAggregationOperator.cs
- ValidateNames.cs
- TextBox.cs
- DecoderFallbackWithFailureFlag.cs
- SqlRowUpdatedEvent.cs
- FixedSOMLineCollection.cs
- DataServiceException.cs
- BamlTreeMap.cs
- ServiceDurableInstance.cs