Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataWebControlsDesign / System / Data / WebControls / Design / EntityDesignerDataSourceView.cs / 2 / 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
- CroppedBitmap.cs
- ControlAdapter.cs
- ObsoleteAttribute.cs
- DictionarySectionHandler.cs
- BindingGraph.cs
- UrlAuthFailureHandler.cs
- TemplatedEditableDesignerRegion.cs
- ChannelDispatcher.cs
- HttpGetServerProtocol.cs
- BaseParser.cs
- Positioning.cs
- OleDbTransaction.cs
- InvalidAsynchronousStateException.cs
- GridLength.cs
- Message.cs
- OdbcException.cs
- SQLGuidStorage.cs
- DrawingBrush.cs
- PbrsForward.cs
- HwndSource.cs
- ValueUtilsSmi.cs
- CustomBinding.cs
- WebPartTransformerAttribute.cs
- Atom10FormatterFactory.cs
- activationcontext.cs
- ProcessRequestArgs.cs
- ConfigurationManager.cs
- Rect3DConverter.cs
- MetadataItemCollectionFactory.cs
- ContentTextAutomationPeer.cs
- InternalMappingException.cs
- ExpressionEditor.cs
- DataGridViewRowCollection.cs
- OracleRowUpdatingEventArgs.cs
- TextDecorationCollection.cs
- DataGridViewCellStyleBuilderDialog.cs
- EncoderParameter.cs
- HttpWriter.cs
- FrameworkReadOnlyPropertyMetadata.cs
- RichTextBox.cs
- System.Data.OracleClient_BID.cs
- AutoResetEvent.cs
- File.cs
- EmptyEnumerable.cs
- CommandField.cs
- HScrollBar.cs
- PropertyGridEditorPart.cs
- PackageProperties.cs
- ImageSource.cs
- ExceptionCollection.cs
- WhitespaceRule.cs
- RoutedUICommand.cs
- DataKey.cs
- CacheMode.cs
- Misc.cs
- MarkupCompilePass2.cs
- EventSetterHandlerConverter.cs
- ApplicationSecurityInfo.cs
- SqlRowUpdatingEvent.cs
- StaticFileHandler.cs
- ThemeDictionaryExtension.cs
- KnowledgeBase.cs
- FieldTemplateUserControl.cs
- WindowsUpDown.cs
- FixedBufferAttribute.cs
- NetWebProxyFinder.cs
- HttpSessionStateBase.cs
- MultiPageTextView.cs
- Itemizer.cs
- TypeInitializationException.cs
- JulianCalendar.cs
- PrimitiveType.cs
- MetadataItemSerializer.cs
- TreeNodeBindingDepthConverter.cs
- ContractValidationHelper.cs
- OdbcCommandBuilder.cs
- StringAttributeCollection.cs
- QualifiedCellIdBoolean.cs
- CustomSignedXml.cs
- GlobalAllocSafeHandle.cs
- DesignerActionService.cs
- LocalBuilder.cs
- StylusCaptureWithinProperty.cs
- ColorAnimationUsingKeyFrames.cs
- RegisteredHiddenField.cs
- SafeNativeMethods.cs
- LabelInfo.cs
- CodeTypeDeclaration.cs
- ObjectManager.cs
- Polyline.cs
- XmlJsonReader.cs
- CheckBoxField.cs
- MULTI_QI.cs
- MultiDataTrigger.cs
- CharacterMetrics.cs
- Int16Storage.cs
- EventListenerClientSide.cs
- BinaryKeyIdentifierClause.cs
- DataGridViewCellStateChangedEventArgs.cs
- ContextStaticAttribute.cs