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
- RuleValidation.cs
- ExternalFile.cs
- EditorZoneBase.cs
- HandleCollector.cs
- ChangeConflicts.cs
- WmlValidatorAdapter.cs
- DebugView.cs
- FontFamily.cs
- CryptoKeySecurity.cs
- UnmanagedMarshal.cs
- UpdatePanelTrigger.cs
- PostBackTrigger.cs
- XmlStrings.cs
- RectangleGeometry.cs
- DataGridViewComboBoxEditingControl.cs
- Pen.cs
- ThreadStaticAttribute.cs
- CancellationToken.cs
- WindowsListViewGroupHelper.cs
- DuplicateContext.cs
- RemoteWebConfigurationHostServer.cs
- WindowsImpersonationContext.cs
- XslCompiledTransform.cs
- Merger.cs
- QilLiteral.cs
- HostedElements.cs
- InstanceView.cs
- ProvideValueServiceProvider.cs
- InstanceOwnerException.cs
- LoadItemsEventArgs.cs
- FixUpCollection.cs
- BinaryFormatter.cs
- ObjectRef.cs
- SHA384CryptoServiceProvider.cs
- Size3DValueSerializer.cs
- XmlBinaryReader.cs
- ConditionChanges.cs
- IsolatedStoragePermission.cs
- IIS7WorkerRequest.cs
- DynamicPropertyHolder.cs
- RectangleF.cs
- TimeSpanOrInfiniteValidator.cs
- ContractMapping.cs
- Line.cs
- BooleanFacetDescriptionElement.cs
- bidPrivateBase.cs
- CodeIndexerExpression.cs
- RoutedEventConverter.cs
- CustomAssemblyResolver.cs
- HttpUnhandledOperationInvoker.cs
- DrawingAttributes.cs
- SimpleTypeResolver.cs
- ToolStripHighContrastRenderer.cs
- SqlConnectionStringBuilder.cs
- HttpRequest.cs
- AutomationPropertyInfo.cs
- StorageTypeMapping.cs
- WindowsListBox.cs
- JapaneseCalendar.cs
- hresults.cs
- ColorMap.cs
- KoreanCalendar.cs
- XmlSchemaComplexContent.cs
- HttpDebugHandler.cs
- VScrollBar.cs
- QueryTask.cs
- TdsParser.cs
- CompilerResults.cs
- XmlAtomicValue.cs
- Compiler.cs
- HttpWriter.cs
- TokenBasedSet.cs
- XPathCompileException.cs
- AssociatedControlConverter.cs
- AstTree.cs
- KeyMatchBuilder.cs
- __ComObject.cs
- StrokeNodeOperations.cs
- ControlCollection.cs
- Psha1DerivedKeyGeneratorHelper.cs
- SystemTcpConnection.cs
- QueryValue.cs
- EventPropertyMap.cs
- OuterProxyWrapper.cs
- TaskFormBase.cs
- Math.cs
- ImageClickEventArgs.cs
- SQLString.cs
- FunctionImportMapping.ReturnTypeRenameMapping.cs
- BypassElementCollection.cs
- ParserContext.cs
- Scene3D.cs
- dbenumerator.cs
- PersonalizationProviderCollection.cs
- ReachDocumentSequenceSerializer.cs
- VScrollProperties.cs
- GeneralTransformGroup.cs
- ConsoleKeyInfo.cs
- ProfilePropertySettingsCollection.cs
- SerializationTrace.cs