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
- LogExtentCollection.cs
- MulticastOption.cs
- SchemaAttDef.cs
- ReadOnlyDataSourceView.cs
- WebRequest.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- ObjectConverter.cs
- TypeKeyValue.cs
- RegistrySecurity.cs
- Operators.cs
- TypeUsageBuilder.cs
- CompilerTypeWithParams.cs
- RawUIStateInputReport.cs
- FunctionMappingTranslator.cs
- DefaultBindingPropertyAttribute.cs
- AttributeUsageAttribute.cs
- GeneralTransform.cs
- WebPartConnectionCollection.cs
- MultiTouchSystemGestureLogic.cs
- CodeStatementCollection.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- ImageAutomationPeer.cs
- CompiledIdentityConstraint.cs
- EdmConstants.cs
- AppSettingsExpressionEditor.cs
- OuterGlowBitmapEffect.cs
- VideoDrawing.cs
- LineMetrics.cs
- ConfigurationFileMap.cs
- CapabilitiesUse.cs
- DesignerSerializerAttribute.cs
- TextServicesCompartment.cs
- SvcMapFileSerializer.cs
- NetNamedPipeBinding.cs
- ConfigurationManagerHelperFactory.cs
- RenderDataDrawingContext.cs
- XmlAutoDetectWriter.cs
- SecurityImpersonationBehavior.cs
- ListItemConverter.cs
- SqlNotificationRequest.cs
- ReachSerializer.cs
- TextEmbeddedObject.cs
- Types.cs
- AnimatedTypeHelpers.cs
- HwndProxyElementProvider.cs
- CultureSpecificStringDictionary.cs
- PointLight.cs
- ManipulationDevice.cs
- ProvidePropertyAttribute.cs
- compensatingcollection.cs
- SourceElementsCollection.cs
- StrokeCollectionDefaultValueFactory.cs
- FormViewPagerRow.cs
- ToolBarButtonClickEvent.cs
- PagedDataSource.cs
- XmlSchema.cs
- HitTestWithGeometryDrawingContextWalker.cs
- SiteMapPath.cs
- PriorityQueue.cs
- LoginNameDesigner.cs
- QueryResponse.cs
- PointUtil.cs
- LinqDataSourceInsertEventArgs.cs
- NullableDoubleMinMaxAggregationOperator.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- ResizeGrip.cs
- BitArray.cs
- CdpEqualityComparer.cs
- EmitterCache.cs
- SettingsContext.cs
- SudsWriter.cs
- TemplateControl.cs
- GridViewItemAutomationPeer.cs
- AutomationIdentifierGuids.cs
- DoubleAnimationClockResource.cs
- GenericRootAutomationPeer.cs
- GroupByQueryOperator.cs
- TimeSpanConverter.cs
- PackageProperties.cs
- CounterCreationDataConverter.cs
- LinqTreeNodeEvaluator.cs
- xmlglyphRunInfo.cs
- DomainLiteralReader.cs
- WebReferencesBuildProvider.cs
- GradientBrush.cs
- TraceListeners.cs
- RemotingSurrogateSelector.cs
- FactoryId.cs
- GridViewSortEventArgs.cs
- Stack.cs
- ObjectSet.cs
- Filter.cs
- DragEventArgs.cs
- SecurityCriticalDataForSet.cs
- VariableAction.cs
- ContractReference.cs
- Graphics.cs
- TransactionValidationBehavior.cs
- SelectorAutomationPeer.cs
- DuplicateContext.cs