Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- ExportOptions.cs
- WindowsFormsSectionHandler.cs
- MatchAllMessageFilter.cs
- BoolExpression.cs
- EntityKey.cs
- MatchAttribute.cs
- URLIdentityPermission.cs
- UnsafeNativeMethods.cs
- VideoDrawing.cs
- Inflater.cs
- FormClosedEvent.cs
- GridSplitterAutomationPeer.cs
- AspNetHostingPermission.cs
- WebPartMenu.cs
- ServiceHttpModule.cs
- DocumentOrderQuery.cs
- TypeDescriptionProvider.cs
- RootCodeDomSerializer.cs
- ScrollBarRenderer.cs
- CommandPlan.cs
- HyperLinkColumn.cs
- JavaScriptString.cs
- EmissiveMaterial.cs
- XmlElementAttribute.cs
- MdImport.cs
- HostingEnvironmentException.cs
- CompositeActivityCodeGenerator.cs
- AttributeAction.cs
- CacheManager.cs
- GridView.cs
- SelectorAutomationPeer.cs
- WorkflowServiceInstance.cs
- ErrorTolerantObjectWriter.cs
- CatalogZone.cs
- ContainerParagraph.cs
- LoadRetryStrategyFactory.cs
- RijndaelManaged.cs
- HtmlWindow.cs
- AsymmetricAlgorithm.cs
- SettingsBindableAttribute.cs
- RegexCode.cs
- FtpWebRequest.cs
- PropertyEmitterBase.cs
- TypeSystemHelpers.cs
- RangeExpression.cs
- ListViewDesigner.cs
- WSTrustDec2005.cs
- WsatAdminException.cs
- RectKeyFrameCollection.cs
- SelectedDatesCollection.cs
- RegexCompilationInfo.cs
- recordstate.cs
- SrgsToken.cs
- XmlSerializerFactory.cs
- StorageTypeMapping.cs
- PrintPreviewGraphics.cs
- TaskResultSetter.cs
- SchemaTableColumn.cs
- SafeLocalAllocation.cs
- SqlRetyper.cs
- PrintDocument.cs
- ViewStateModeByIdAttribute.cs
- ConnectionsZone.cs
- EncryptedData.cs
- WindowsIPAddress.cs
- IPAddress.cs
- RelationshipSet.cs
- PipelineModuleStepContainer.cs
- BookmarkScopeManager.cs
- TransportChannelFactory.cs
- OperandQuery.cs
- FontFamilyConverter.cs
- CompositeDuplexElement.cs
- StrokeFIndices.cs
- UInt32Storage.cs
- TypedTableBaseExtensions.cs
- Qualifier.cs
- RangeValuePattern.cs
- HtmlGenericControl.cs
- RegexNode.cs
- TdsParserSafeHandles.cs
- MonikerUtility.cs
- TimeStampChecker.cs
- HtmlInputPassword.cs
- RootBuilder.cs
- FormsAuthenticationConfiguration.cs
- OleDbInfoMessageEvent.cs
- WinFormsComponentEditor.cs
- ScrollProviderWrapper.cs
- MemoryResponseElement.cs
- BrowserCapabilitiesFactory.cs
- AssemblyInfo.cs
- RealProxy.cs
- ReadWriteObjectLock.cs
- AsyncParams.cs
- WindowsListViewScroll.cs
- Wizard.cs
- WindowsPrincipal.cs
- CustomPeerResolverService.cs
- XmlQuerySequence.cs