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
- PingReply.cs
- KeyGestureValueSerializer.cs
- IDQuery.cs
- Number.cs
- Int32RectValueSerializer.cs
- ViewGenerator.cs
- PermissionRequestEvidence.cs
- BamlBinaryWriter.cs
- OrderedEnumerableRowCollection.cs
- FilteredSchemaElementLookUpTable.cs
- ExcludeFromCodeCoverageAttribute.cs
- BaseCollection.cs
- StorageSetMapping.cs
- XslVisitor.cs
- COM2EnumConverter.cs
- Padding.cs
- EntityDataSourceChangingEventArgs.cs
- CompositeActivityValidator.cs
- IPEndPointCollection.cs
- TargetConverter.cs
- CorrelationManager.cs
- XmlWhitespace.cs
- OutputCacheModule.cs
- DesigntimeLicenseContextSerializer.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- _NetworkingPerfCounters.cs
- PersonalizationEntry.cs
- DataServiceQueryProvider.cs
- InheritedPropertyDescriptor.cs
- GridSplitter.cs
- LambdaCompiler.Generated.cs
- DataGridViewComboBoxCell.cs
- infer.cs
- SecurityUtils.cs
- CodeExpressionCollection.cs
- SegmentInfo.cs
- CodeGenerator.cs
- WorkerRequest.cs
- SQLDecimal.cs
- LogicalExpressionEditor.cs
- FormatSettings.cs
- ControlBindingsCollection.cs
- SByteConverter.cs
- RequiredAttributeAttribute.cs
- BindingManagerDataErrorEventArgs.cs
- CanonicalXml.cs
- RunClient.cs
- KnownIds.cs
- ByteStreamGeometryContext.cs
- TreeView.cs
- PolyLineSegmentFigureLogic.cs
- LinkLabel.cs
- ScriptingSectionGroup.cs
- ListViewSortEventArgs.cs
- Win32SafeHandles.cs
- KnownAssemblyEntry.cs
- WindowVisualStateTracker.cs
- XmlQualifiedName.cs
- PolicyManager.cs
- ColumnReorderedEventArgs.cs
- Visual3D.cs
- AppDomainManager.cs
- OdbcEnvironment.cs
- Utils.cs
- HttpChannelHelpers.cs
- OleAutBinder.cs
- LinqDataSourceContextData.cs
- ItemType.cs
- mediaclock.cs
- linebase.cs
- SQLDoubleStorage.cs
- InkCanvasSelectionAdorner.cs
- DataGridLinkButton.cs
- HtmlFormAdapter.cs
- DependentList.cs
- Tile.cs
- ConstructorBuilder.cs
- Select.cs
- ResourceBinder.cs
- ParallelDesigner.cs
- SQLBytesStorage.cs
- WebPart.cs
- SkinBuilder.cs
- ToolStripStatusLabel.cs
- PassportPrincipal.cs
- UiaCoreTypesApi.cs
- ActiveXContainer.cs
- ContextMenu.cs
- WsdlParser.cs
- AnnotationDocumentPaginator.cs
- SafeRegistryHandle.cs
- Run.cs
- SHA384Managed.cs
- XhtmlStyleClass.cs
- EnumBuilder.cs
- WindowsHyperlink.cs
- PackageRelationshipCollection.cs
- SiblingIterators.cs
- GridLengthConverter.cs
- KeyPressEvent.cs