Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SessionSwitchEventArgs.cs
- EventData.cs
- CodeDomComponentSerializationService.cs
- CodeDOMUtility.cs
- IISUnsafeMethods.cs
- DataGridViewTextBoxCell.cs
- HttpListenerPrefixCollection.cs
- TextRunProperties.cs
- ColorTransform.cs
- InvalidateEvent.cs
- ColorConvertedBitmapExtension.cs
- MembershipSection.cs
- util.cs
- MaskedTextBox.cs
- EncodingTable.cs
- EnumDataContract.cs
- shaper.cs
- FormsAuthenticationCredentials.cs
- WinEventTracker.cs
- FunctionCommandText.cs
- RangeEnumerable.cs
- XmlSchemaDatatype.cs
- MsmqTransportElement.cs
- MbpInfo.cs
- BinaryFormatterWriter.cs
- glyphs.cs
- Container.cs
- SafeSystemMetrics.cs
- XmlSchemaAttributeGroup.cs
- XmlSchemaNotation.cs
- HyperLinkDataBindingHandler.cs
- WasAdminWrapper.cs
- SecureUICommand.cs
- HtmlButton.cs
- SmtpAuthenticationManager.cs
- ResizeGrip.cs
- Sql8ConformanceChecker.cs
- BindingElement.cs
- ArrangedElement.cs
- PolyQuadraticBezierSegment.cs
- RoleExceptions.cs
- RoleGroupCollection.cs
- PermissionRequestEvidence.cs
- ControlAdapter.cs
- ButtonStandardAdapter.cs
- RegexCapture.cs
- InlinedLocationReference.cs
- XmlSchemaType.cs
- log.cs
- DiscreteKeyFrames.cs
- FontCollection.cs
- altserialization.cs
- AppLevelCompilationSectionCache.cs
- ValueChangedEventManager.cs
- UnsafeNativeMethods.cs
- PropertyPanel.cs
- CodeLabeledStatement.cs
- Internal.cs
- RangeValuePattern.cs
- BindUriHelper.cs
- ZipIOBlockManager.cs
- WebHostScriptMappingsInstallComponent.cs
- HostUtils.cs
- StatusBar.cs
- OdbcParameterCollection.cs
- ResourceLoader.cs
- SqlDependency.cs
- TextBounds.cs
- DataMember.cs
- GenericTypeParameterBuilder.cs
- XpsSerializerFactory.cs
- ProfileInfo.cs
- AuthenticationServiceManager.cs
- DomainConstraint.cs
- TagMapInfo.cs
- SqlRewriteScalarSubqueries.cs
- AspProxy.cs
- DataGridCellAutomationPeer.cs
- SwitchElementsCollection.cs
- RelatedCurrencyManager.cs
- LineUtil.cs
- __ComObject.cs
- Socket.cs
- TableLayoutRowStyleCollection.cs
- InfoCardRSAPKCS1KeyExchangeFormatter.cs
- Scene3D.cs
- FormViewDeletedEventArgs.cs
- MachineKeySection.cs
- ComponentCommands.cs
- FixedSchema.cs
- ItemsControlAutomationPeer.cs
- UnsafeNativeMethods.cs
- BuildDependencySet.cs
- MulticastNotSupportedException.cs
- QilFunction.cs
- ReliableMessagingHelpers.cs
- formatter.cs
- COM2IProvidePropertyBuilderHandler.cs
- DataGridTextBox.cs
- ComboBox.cs