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
- ReadOnlyNameValueCollection.cs
- MetadataArtifactLoaderResource.cs
- ConnectionsZone.cs
- AssemblyBuilderData.cs
- OutputCacheEntry.cs
- Object.cs
- GridViewRowPresenter.cs
- VariableQuery.cs
- ValidationEventArgs.cs
- LinkUtilities.cs
- TreeViewItemAutomationPeer.cs
- XmlElementAttribute.cs
- WSDualHttpBindingCollectionElement.cs
- SqlColumnizer.cs
- AppDomainGrammarProxy.cs
- AssemblyBuilderData.cs
- Error.cs
- Inline.cs
- WSHttpBindingElement.cs
- BaseCAMarshaler.cs
- MailWebEventProvider.cs
- ActivityExecutorDelegateInfo.cs
- DataGridViewComboBoxEditingControl.cs
- Missing.cs
- SystemNetHelpers.cs
- ControlSerializer.cs
- Effect.cs
- XmlComment.cs
- XmlAnyElementAttribute.cs
- HtmlSelectionListAdapter.cs
- Literal.cs
- ImageMapEventArgs.cs
- OdbcException.cs
- XmlSchemaObject.cs
- LayoutTableCell.cs
- HttpListenerRequestUriBuilder.cs
- KeyFrames.cs
- TextEditorContextMenu.cs
- InstancePersistenceCommand.cs
- ValidatorUtils.cs
- WriteTimeStream.cs
- X509UI.cs
- FirstMatchCodeGroup.cs
- XmlReader.cs
- TempFiles.cs
- ModelUIElement3D.cs
- __Filters.cs
- SelectorItemAutomationPeer.cs
- EffectiveValueEntry.cs
- CodeAttributeArgument.cs
- nulltextcontainer.cs
- SafeNativeMethodsOther.cs
- PlainXmlDeserializer.cs
- MouseEvent.cs
- SqlDataSourceView.cs
- DocumentSequenceHighlightLayer.cs
- SafeNativeMethodsCLR.cs
- OrderByQueryOptionExpression.cs
- AdRotatorDesigner.cs
- Rect3D.cs
- TryCatchDesigner.xaml.cs
- DataSourceView.cs
- NumericUpDownAccelerationCollection.cs
- QuotaExceededException.cs
- CodeMethodInvokeExpression.cs
- SingleKeyFrameCollection.cs
- APCustomTypeDescriptor.cs
- AttributedMetaModel.cs
- ToolStripProgressBar.cs
- PeerPresenceInfo.cs
- DataControlFieldCell.cs
- _OSSOCK.cs
- HttpServerVarsCollection.cs
- SerializationInfo.cs
- ColumnMapTranslator.cs
- RectangleHotSpot.cs
- XhtmlCssHandler.cs
- PassportPrincipal.cs
- AuthenticationModulesSection.cs
- LineInfo.cs
- BitmapEffectGroup.cs
- XmlEntityReference.cs
- WebServiceClientProxyGenerator.cs
- RoleManagerModule.cs
- wmiprovider.cs
- SmtpDigestAuthenticationModule.cs
- TemplateApplicationHelper.cs
- _BaseOverlappedAsyncResult.cs
- OptimizedTemplateContentHelper.cs
- ISFTagAndGuidCache.cs
- CapabilitiesAssignment.cs
- ToolStripDropDownMenu.cs
- XPathMultyIterator.cs
- PropertiesTab.cs
- JsonEnumDataContract.cs
- SecureEnvironment.cs
- ICspAsymmetricAlgorithm.cs
- StylusEditingBehavior.cs
- BoundField.cs
- PasswordRecoveryAutoFormat.cs