Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- DataGridItemEventArgs.cs
- DataSourceView.cs
- XmlObjectSerializerWriteContextComplex.cs
- templategroup.cs
- ScriptRef.cs
- PagedDataSource.cs
- SqlInternalConnection.cs
- propertytag.cs
- CLSCompliantAttribute.cs
- XsltArgumentList.cs
- ScrollChangedEventArgs.cs
- DtdParser.cs
- ParameterElement.cs
- StylusPointProperties.cs
- PropertyPath.cs
- RemotingAttributes.cs
- TargetControlTypeCache.cs
- TransactedReceiveData.cs
- ProtocolsSection.cs
- XsltContext.cs
- VersionedStreamOwner.cs
- TypedReference.cs
- TargetInvocationException.cs
- ApplicationDirectory.cs
- BuildProvider.cs
- FaultDesigner.cs
- SchemaMapping.cs
- ThumbButtonInfoCollection.cs
- Grant.cs
- NetNamedPipeBindingCollectionElement.cs
- GridLengthConverter.cs
- SimpleWebHandlerParser.cs
- OleDbFactory.cs
- GradientStop.cs
- EncoderNLS.cs
- OutputCacheModule.cs
- sqlmetadatafactory.cs
- ListDictionary.cs
- SafeThreadHandle.cs
- RangeValuePattern.cs
- FlowDocumentPageViewerAutomationPeer.cs
- EventSinkHelperWriter.cs
- ClientSponsor.cs
- contentDescriptor.cs
- TableSectionStyle.cs
- XPathAncestorIterator.cs
- RoleProviderPrincipal.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- XmlLangPropertyAttribute.cs
- XmlSequenceWriter.cs
- WebPartExportVerb.cs
- UriTemplateDispatchFormatter.cs
- RemoteWebConfigurationHost.cs
- ExpressionBuilderCollection.cs
- DoubleAnimationUsingKeyFrames.cs
- SpellerHighlightLayer.cs
- ExternalException.cs
- RevocationPoint.cs
- SqlUDTStorage.cs
- NonVisualControlAttribute.cs
- DataServices.cs
- CodeGenerator.cs
- Utils.cs
- ValueTable.cs
- XmlNodeComparer.cs
- BitSet.cs
- FontNamesConverter.cs
- XPathNavigatorReader.cs
- Schema.cs
- RemotingAttributes.cs
- MessagePropertyVariants.cs
- DbModificationCommandTree.cs
- ClientTarget.cs
- CursorConverter.cs
- SecureStringHasher.cs
- CultureInfoConverter.cs
- ViewManager.cs
- HashAlgorithm.cs
- XmlCodeExporter.cs
- StoragePropertyMapping.cs
- MatchSingleFxEngineOpcode.cs
- PassportAuthentication.cs
- CollectionViewGroup.cs
- RefreshInfo.cs
- UserControlCodeDomTreeGenerator.cs
- TextElementCollection.cs
- ArrayTypeMismatchException.cs
- AtomEntry.cs
- MultiDataTrigger.cs
- ResXResourceSet.cs
- LogReserveAndAppendState.cs
- AdRotator.cs
- IISUnsafeMethods.cs
- HandledEventArgs.cs
- DbParameterHelper.cs
- X509Certificate2.cs
- ValidationSummary.cs
- Pointer.cs
- PropertyRef.cs
- Membership.cs