Code:
/ 4.0 / 4.0 / 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. //------------------------------------------------------------------------------ //// 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
- GuidConverter.cs
- RawUIStateInputReport.cs
- OdbcConnectionHandle.cs
- EmptyCollection.cs
- DiagnosticsConfiguration.cs
- ProgressBarBrushConverter.cs
- Verify.cs
- _LoggingObject.cs
- BindingList.cs
- RulePatternOps.cs
- EncodingDataItem.cs
- pingexception.cs
- ElementAction.cs
- Globals.cs
- TokenBasedSetEnumerator.cs
- XmlSchemaSimpleTypeList.cs
- PrefixHandle.cs
- CodeIterationStatement.cs
- OwnerDrawPropertyBag.cs
- Thickness.cs
- DispatcherProcessingDisabled.cs
- ValidationResult.cs
- XmlSchemaValidationException.cs
- BatchStream.cs
- WindowsListViewItemCheckBox.cs
- MediaSystem.cs
- BamlMapTable.cs
- FormViewAutoFormat.cs
- Point3DIndependentAnimationStorage.cs
- User.cs
- DbFunctionCommandTree.cs
- HashMembershipCondition.cs
- CachedFontFamily.cs
- BaseConfigurationRecord.cs
- BooleanKeyFrameCollection.cs
- objectquery_tresulttype.cs
- CellNormalizer.cs
- Publisher.cs
- EmbeddedMailObject.cs
- QuotedPrintableStream.cs
- Positioning.cs
- EncodingNLS.cs
- ArrangedElementCollection.cs
- SoapElementAttribute.cs
- DocumentPageTextView.cs
- HttpContext.cs
- TextServicesManager.cs
- Parameter.cs
- EntityContainerAssociationSetEnd.cs
- TextChangedEventArgs.cs
- DependencyPropertyConverter.cs
- TypographyProperties.cs
- BitmapData.cs
- DocumentPageView.cs
- PropertyTabChangedEvent.cs
- SystemIcons.cs
- ExtensionWindowResizeGrip.cs
- PrinterUnitConvert.cs
- ToolStripProgressBar.cs
- StyleHelper.cs
- BorderGapMaskConverter.cs
- Trigger.cs
- ClientProxyGenerator.cs
- TriggerActionCollection.cs
- AuthorizationSection.cs
- TemplateInstanceAttribute.cs
- PriorityChain.cs
- WebControl.cs
- ArraySet.cs
- EnumUnknown.cs
- EncodingTable.cs
- ClonableStack.cs
- HtmlString.cs
- PrimaryKeyTypeConverter.cs
- ByteAnimationUsingKeyFrames.cs
- WhiteSpaceTrimStringConverter.cs
- Annotation.cs
- BasicExpressionVisitor.cs
- FixedStringLookup.cs
- DataObject.cs
- ErrorRuntimeConfig.cs
- PartitionResolver.cs
- HeaderUtility.cs
- TypeSchema.cs
- MetadataArtifactLoaderFile.cs
- MatrixIndependentAnimationStorage.cs
- WebColorConverter.cs
- EdmProperty.cs
- ChangePassword.cs
- XmlEventCache.cs
- MissingMethodException.cs
- VisualTarget.cs
- BindingContext.cs
- FolderBrowserDialog.cs
- ADRoleFactoryConfiguration.cs
- FileDialog.cs
- TrackPointCollection.cs
- TemplatePartAttribute.cs
- HttpModuleActionCollection.cs
- AnonymousIdentificationModule.cs