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
- ObjectNavigationPropertyMapping.cs
- QueryGeneratorBase.cs
- Style.cs
- TextWriterTraceListener.cs
- SessionSymmetricMessageSecurityProtocolFactory.cs
- mediaeventargs.cs
- CellQuery.cs
- SoapEnumAttribute.cs
- Vector.cs
- SurrogateEncoder.cs
- XmlElementElementCollection.cs
- AttributedMetaModel.cs
- RegisteredScript.cs
- FontDialog.cs
- TableLayoutColumnStyleCollection.cs
- Match.cs
- NamespaceListProperty.cs
- VisualProxy.cs
- LineMetrics.cs
- Publisher.cs
- FlowLayout.cs
- PlanCompiler.cs
- CodeBinaryOperatorExpression.cs
- ConsumerConnectionPoint.cs
- WizardForm.cs
- ObjectDataSourceStatusEventArgs.cs
- LicenseContext.cs
- EnvelopedSignatureTransform.cs
- LambdaExpression.cs
- DataTableMapping.cs
- XmlSerializerAssemblyAttribute.cs
- GPRECTF.cs
- Configuration.cs
- util.cs
- ServiceNotStartedException.cs
- AppDomainInfo.cs
- SourceSwitch.cs
- LockRecursionException.cs
- ReferentialConstraint.cs
- WebPartMenuStyle.cs
- OutputWindow.cs
- ChangeTracker.cs
- ToolStripSystemRenderer.cs
- ReachDocumentSequenceSerializer.cs
- SelectedDatesCollection.cs
- RegisteredExpandoAttribute.cs
- TextDecoration.cs
- IfAction.cs
- DataControlLinkButton.cs
- MasterPageParser.cs
- APCustomTypeDescriptor.cs
- FindCriteriaCD1.cs
- EmissiveMaterial.cs
- ProxyWebPartConnectionCollection.cs
- EntityContainerRelationshipSetEnd.cs
- Interfaces.cs
- OrderPreservingPipeliningSpoolingTask.cs
- WebResourceAttribute.cs
- IisTraceListener.cs
- SQLByteStorage.cs
- DbDataReader.cs
- EventMemberCodeDomSerializer.cs
- SettingsProperty.cs
- DataObjectSettingDataEventArgs.cs
- RegexCode.cs
- ConfigXmlReader.cs
- SerialPinChanges.cs
- ApplicationHost.cs
- TextServicesCompartment.cs
- NetworkInformationException.cs
- ServiceRoute.cs
- CompModSwitches.cs
- CLSCompliantAttribute.cs
- ItemsPresenter.cs
- ImmComposition.cs
- NetworkAddressChange.cs
- DataFormats.cs
- HttpStreamMessageEncoderFactory.cs
- Atom10FeedFormatter.cs
- WebDescriptionAttribute.cs
- LabelTarget.cs
- formatstringdialog.cs
- ControlUtil.cs
- _SafeNetHandles.cs
- MetaModel.cs
- ResizeGrip.cs
- TimeSpan.cs
- IsolatedStorageFilePermission.cs
- isolationinterop.cs
- FontUnit.cs
- ScrollChrome.cs
- ConfigurationValues.cs
- EntityProviderFactory.cs
- MonthChangedEventArgs.cs
- WrappingXamlSchemaContext.cs
- SvcMapFileLoader.cs
- ToolTipService.cs
- DataPointer.cs
- DesignerCommandSet.cs
- InlinedAggregationOperatorEnumerator.cs