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
- MailMessage.cs
- X509CertificateCollection.cs
- HashMembershipCondition.cs
- XmlSecureResolver.cs
- MenuItemBinding.cs
- RadialGradientBrush.cs
- RelationshipConverter.cs
- WorkBatch.cs
- CompilationSection.cs
- invalidudtexception.cs
- CryptoProvider.cs
- ToolStripDropTargetManager.cs
- ParserHooks.cs
- NameTable.cs
- SchemaNotation.cs
- GenericRootAutomationPeer.cs
- BatchWriter.cs
- JsonDataContract.cs
- COAUTHIDENTITY.cs
- TemplatePropertyEntry.cs
- UIPermission.cs
- Image.cs
- TaskFileService.cs
- UnknownWrapper.cs
- WpfXamlLoader.cs
- XmlBoundElement.cs
- XmlValidatingReaderImpl.cs
- CompilerScopeManager.cs
- BooleanSwitch.cs
- DrawingContext.cs
- TripleDES.cs
- Trigger.cs
- ProfessionalColors.cs
- MaskedTextProvider.cs
- FontStretch.cs
- CharEnumerator.cs
- DataGridViewComboBoxCell.cs
- HttpRawResponse.cs
- SelectionBorderGlyph.cs
- SurrogateEncoder.cs
- FullTextBreakpoint.cs
- SQLGuid.cs
- Line.cs
- TextEditorCharacters.cs
- ISCIIEncoding.cs
- DataGridRowEventArgs.cs
- WebPartZoneCollection.cs
- ToolBarOverflowPanel.cs
- Registration.cs
- IPGlobalProperties.cs
- DataPagerCommandEventArgs.cs
- OrCondition.cs
- CheckBoxBaseAdapter.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- DecoderBestFitFallback.cs
- ComboBoxRenderer.cs
- SqlRowUpdatedEvent.cs
- IPAddress.cs
- ContextProperty.cs
- WebPartCatalogCloseVerb.cs
- OdbcRowUpdatingEvent.cs
- TextFormatter.cs
- UnsafeNativeMethods.cs
- XmlUtil.cs
- CodeThrowExceptionStatement.cs
- CompositeCollectionView.cs
- Identifier.cs
- TypeGeneratedEventArgs.cs
- WebHeaderCollection.cs
- TextTreeInsertElementUndoUnit.cs
- WindowShowOrOpenTracker.cs
- ToolBarButtonClickEvent.cs
- WebPartEditorOkVerb.cs
- HTMLTagNameToTypeMapper.cs
- CodeMethodInvokeExpression.cs
- Package.cs
- VisualStyleElement.cs
- ModulesEntry.cs
- StreamGeometryContext.cs
- UIAgentAsyncParams.cs
- SmtpNetworkElement.cs
- OdbcReferenceCollection.cs
- ComponentConverter.cs
- DesignTable.cs
- GreenMethods.cs
- DataGridViewCellCancelEventArgs.cs
- Image.cs
- Attribute.cs
- ObjectQuery.cs
- SafeSystemMetrics.cs
- LocalizeDesigner.cs
- TextParagraphCache.cs
- NativeCppClassAttribute.cs
- ScrollData.cs
- PasswordTextNavigator.cs
- NotSupportedException.cs
- AutoGeneratedField.cs
- TextHidden.cs
- SBCSCodePageEncoding.cs
- EmptyEnumerator.cs