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
- ScriptDescriptor.cs
- CalculatedColumn.cs
- XamlReader.cs
- SystemIcmpV4Statistics.cs
- Baml2006Reader.cs
- CompressedStack.cs
- TextRangeSerialization.cs
- GcHandle.cs
- Oid.cs
- LocationReference.cs
- XamlReaderHelper.cs
- itemelement.cs
- RelationshipManager.cs
- WindowsButton.cs
- OdbcConnectionOpen.cs
- TransactionInformation.cs
- ChainedAsyncResult.cs
- FileStream.cs
- XmlSchemaProviderAttribute.cs
- StringArrayEditor.cs
- DbSource.cs
- LoginCancelEventArgs.cs
- NonParentingControl.cs
- InputEventArgs.cs
- ListViewHitTestInfo.cs
- MessageHeaderT.cs
- ResumeStoryboard.cs
- TdsValueSetter.cs
- IDQuery.cs
- PathSegment.cs
- QuaternionAnimation.cs
- PerspectiveCamera.cs
- SqlFacetAttribute.cs
- WebPartZoneBase.cs
- SerializationTrace.cs
- TypeConverterHelper.cs
- TextPattern.cs
- ClientRuntimeConfig.cs
- TableLayoutColumnStyleCollection.cs
- ElementHostPropertyMap.cs
- _AcceptOverlappedAsyncResult.cs
- EntityCommand.cs
- MissingManifestResourceException.cs
- SerializeAbsoluteContext.cs
- CodeTypeDeclarationCollection.cs
- DataGridViewRowPrePaintEventArgs.cs
- ConsoleTraceListener.cs
- ManifestSignedXml.cs
- UnmanagedBitmapWrapper.cs
- DbDataSourceEnumerator.cs
- RepeatBehaviorConverter.cs
- AxHost.cs
- SettingsBindableAttribute.cs
- EdmComplexPropertyAttribute.cs
- OrderingQueryOperator.cs
- AppModelKnownContentFactory.cs
- VirtualPathProvider.cs
- MessageContractAttribute.cs
- BamlResourceContent.cs
- StylusPointPropertyId.cs
- Delegate.cs
- WebBrowserEvent.cs
- DbConnectionClosed.cs
- AutomationElementCollection.cs
- ButtonPopupAdapter.cs
- securitycriticaldataformultiplegetandset.cs
- BamlTreeMap.cs
- ObjectViewQueryResultData.cs
- FixedFindEngine.cs
- DelegatingTypeDescriptionProvider.cs
- ValidationError.cs
- ListBoxChrome.cs
- BaseDataBoundControlDesigner.cs
- XmlEntity.cs
- FloatUtil.cs
- ReferencedType.cs
- sitestring.cs
- ReadOnlyNameValueCollection.cs
- CodeExpressionStatement.cs
- DataGridViewControlCollection.cs
- CodeObject.cs
- _ServiceNameStore.cs
- PointIndependentAnimationStorage.cs
- FieldReference.cs
- VirtualizingStackPanel.cs
- ChoiceConverter.cs
- HtmlLabelAdapter.cs
- TraceSection.cs
- HyperlinkAutomationPeer.cs
- ZipIOCentralDirectoryFileHeader.cs
- DataGridCellInfo.cs
- BitmapEffectGroup.cs
- NotificationContext.cs
- TargetConverter.cs
- BooleanFunctions.cs
- HeaderPanel.cs
- Guid.cs
- TagMapCollection.cs
- DesignerDeviceConfig.cs
- WindowsMenu.cs