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
- ReceiveActivityDesigner.cs
- DockPatternIdentifiers.cs
- CatalogZoneBase.cs
- UsernameTokenFactoryCredential.cs
- Grant.cs
- PieceNameHelper.cs
- AnnotationService.cs
- WsatTransactionHeader.cs
- SessionStateUtil.cs
- RSAPKCS1SignatureDeformatter.cs
- ReliabilityContractAttribute.cs
- ResourcesChangeInfo.cs
- OuterGlowBitmapEffect.cs
- PrinterResolution.cs
- HopperCache.cs
- CodeAttributeDeclarationCollection.cs
- WorkflowElementDialogWindow.xaml.cs
- GCHandleCookieTable.cs
- FileDialogPermission.cs
- WebPartManager.cs
- MenuAutomationPeer.cs
- AuthorizationRuleCollection.cs
- ChildDocumentBlock.cs
- SubMenuStyleCollection.cs
- Statements.cs
- WpfSharedXamlSchemaContext.cs
- Vector3DConverter.cs
- FixedDocument.cs
- ClientBuildManager.cs
- CheckBoxField.cs
- Region.cs
- XMLDiffLoader.cs
- CompilationRelaxations.cs
- ContentElement.cs
- XmlILAnnotation.cs
- BindingCompleteEventArgs.cs
- StringPropertyBuilder.cs
- ConditionCollection.cs
- METAHEADER.cs
- ControlTemplate.cs
- HTMLTextWriter.cs
- Bold.cs
- RemotingSurrogateSelector.cs
- Italic.cs
- odbcmetadatacollectionnames.cs
- StructuredCompositeActivityDesigner.cs
- Semaphore.cs
- MailBnfHelper.cs
- TrustManagerMoreInformation.cs
- Constraint.cs
- XmlArrayItemAttributes.cs
- DataMemberConverter.cs
- LeafCellTreeNode.cs
- InvalidateEvent.cs
- UserPreferenceChangingEventArgs.cs
- BinaryObjectWriter.cs
- TextPointerBase.cs
- DataServiceRequestException.cs
- Oci.cs
- AccessibleObject.cs
- XPathNavigator.cs
- Transaction.cs
- AnimationLayer.cs
- SkipQueryOptionExpression.cs
- PeerNearMe.cs
- ByteStream.cs
- DataBoundLiteralControl.cs
- Int32Converter.cs
- SimpleHandlerFactory.cs
- WebPartVerb.cs
- EnglishPluralizationService.cs
- SoapException.cs
- SiteMapNodeItem.cs
- PersonalizationDictionary.cs
- wpf-etw.cs
- LinqDataView.cs
- COM2TypeInfoProcessor.cs
- WebPartZoneBase.cs
- TagPrefixAttribute.cs
- Part.cs
- ProtectedConfigurationSection.cs
- RepeatButton.cs
- ItemTypeToolStripMenuItem.cs
- MergeLocalizationDirectives.cs
- SqlReferenceCollection.cs
- WebPartTracker.cs
- DataRowExtensions.cs
- InternalBufferOverflowException.cs
- DataSet.cs
- PriorityQueue.cs
- CodeIterationStatement.cs
- SqlDataSourceEnumerator.cs
- SqlParameter.cs
- EntityTypeEmitter.cs
- ValidationContext.cs
- JobCollate.cs
- EntityUtil.cs
- DropDownList.cs
- MenuScrollingVisibilityConverter.cs
- CardSpaceSelector.cs