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
- WebBrowserContainer.cs
- HttpCacheVaryByContentEncodings.cs
- ExtractCollection.cs
- ConnectionStringsExpressionBuilder.cs
- WebPartAddingEventArgs.cs
- LocatorGroup.cs
- contentDescriptor.cs
- XmlSchemaImporter.cs
- ActivityBuilder.cs
- EventEntry.cs
- NumericExpr.cs
- EventBindingService.cs
- CompositeControl.cs
- RegularExpressionValidator.cs
- CustomCategoryAttribute.cs
- LateBoundBitmapDecoder.cs
- MimeParameter.cs
- ListItemConverter.cs
- WebServiceHostFactory.cs
- PropertyValueChangedEvent.cs
- TwoPhaseCommit.cs
- SerialReceived.cs
- WebRequest.cs
- ZipIOModeEnforcingStream.cs
- RealizationContext.cs
- AssemblyAttributesGoHere.cs
- AdornerHitTestResult.cs
- XmlChoiceIdentifierAttribute.cs
- KoreanCalendar.cs
- SqlDataSourceSelectingEventArgs.cs
- RubberbandSelector.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- Validator.cs
- TextEditorDragDrop.cs
- ScaleTransform.cs
- DataRowComparer.cs
- ColumnTypeConverter.cs
- TransactionBridgeSection.cs
- GlyphingCache.cs
- SafeFileMapViewHandle.cs
- WebBrowserDocumentCompletedEventHandler.cs
- FormsAuthenticationTicket.cs
- TextServicesLoader.cs
- PointConverter.cs
- WebHeaderCollection.cs
- HostingEnvironmentException.cs
- TextViewBase.cs
- UIElementAutomationPeer.cs
- ValidationHelper.cs
- CapabilitiesPattern.cs
- ExpressionBuilderCollection.cs
- SoapAttributeAttribute.cs
- ConfigurationElement.cs
- DataPager.cs
- ValueTable.cs
- SplashScreenNativeMethods.cs
- _ListenerAsyncResult.cs
- OracleInfoMessageEventArgs.cs
- PropertyDescriptorCollection.cs
- SortQuery.cs
- Annotation.cs
- BrowserCapabilitiesFactoryBase.cs
- CallbackHandler.cs
- WebPartManagerInternals.cs
- StackOverflowException.cs
- Transactions.cs
- MediaContextNotificationWindow.cs
- WebPartConnectionsConnectVerb.cs
- _LazyAsyncResult.cs
- EntityCollectionChangedParams.cs
- Selection.cs
- SQLGuidStorage.cs
- VerificationAttribute.cs
- PropertySegmentSerializationProvider.cs
- PersonalizableTypeEntry.cs
- TableDetailsRow.cs
- SqlNode.cs
- MetafileHeaderEmf.cs
- SamlConditions.cs
- HandlerBase.cs
- InfoCardHelper.cs
- InputBuffer.cs
- DocumentGridPage.cs
- DisplayNameAttribute.cs
- NetworkAddressChange.cs
- XmlAggregates.cs
- MatchAllMessageFilter.cs
- CompilerCollection.cs
- Group.cs
- DecoderFallbackWithFailureFlag.cs
- BaseComponentEditor.cs
- GridViewColumnHeaderAutomationPeer.cs
- SqlException.cs
- BrowserDefinition.cs
- TailPinnedEventArgs.cs
- QilXmlReader.cs
- SchemaElementDecl.cs
- ElementNotEnabledException.cs
- OverrideMode.cs
- DataTableMappingCollection.cs