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
- EventLogPermissionEntryCollection.cs
- PaintEvent.cs
- GlyphRunDrawing.cs
- ParameterCollection.cs
- StateBag.cs
- EmptyStringExpandableObjectConverter.cs
- MarkupExtensionParser.cs
- XmlSchemaType.cs
- QueryCacheKey.cs
- FileLogRecordEnumerator.cs
- MemberDescriptor.cs
- AnonymousIdentificationModule.cs
- _SslStream.cs
- ValidatorCompatibilityHelper.cs
- ValueHandle.cs
- BinaryReader.cs
- OdbcConnection.cs
- TextBounds.cs
- WebPartConnection.cs
- XamlSerializerUtil.cs
- SqlDeflator.cs
- FileSystemInfo.cs
- InternalTypeHelper.cs
- DetailsViewUpdateEventArgs.cs
- WebBrowserProgressChangedEventHandler.cs
- XmlHierarchicalDataSourceView.cs
- ResXDataNode.cs
- Scene3D.cs
- DataGridViewRowConverter.cs
- CAGDesigner.cs
- _SSPISessionCache.cs
- TextBoxBase.cs
- WebRequestModuleElement.cs
- WinEventQueueItem.cs
- WeakReferenceKey.cs
- StringCollectionEditor.cs
- Help.cs
- ClientFormsAuthenticationMembershipProvider.cs
- Automation.cs
- AsymmetricKeyExchangeDeformatter.cs
- XmlIgnoreAttribute.cs
- FormatConvertedBitmap.cs
- DocumentXmlWriter.cs
- StrokeCollection2.cs
- PolyQuadraticBezierSegment.cs
- FunctionUpdateCommand.cs
- QilChoice.cs
- FormsIdentity.cs
- ClientSideQueueItem.cs
- GacUtil.cs
- Model3DGroup.cs
- Imaging.cs
- NumberFormatInfo.cs
- SignedInfo.cs
- Model3D.cs
- ReflectPropertyDescriptor.cs
- NetworkCredential.cs
- InvalidPrinterException.cs
- Object.cs
- OdbcDataReader.cs
- CodeDefaultValueExpression.cs
- MessageHeaders.cs
- ElementNotEnabledException.cs
- OdbcError.cs
- TypeElement.cs
- UdpAnnouncementEndpoint.cs
- DelegateTypeInfo.cs
- EndpointReference.cs
- PropertyRef.cs
- Int32Converter.cs
- MailWriter.cs
- Bitmap.cs
- tooltip.cs
- InvokeHandlers.cs
- RepeaterItem.cs
- XmlSerializationReader.cs
- MeasurementDCInfo.cs
- Menu.cs
- PeerNameResolver.cs
- HtmlTernaryTree.cs
- SmtpClient.cs
- basevalidator.cs
- OutputScopeManager.cs
- XmlSchemaAnnotation.cs
- WindowsRichEdit.cs
- TimeSpan.cs
- LinkClickEvent.cs
- ScriptComponentDescriptor.cs
- DPCustomTypeDescriptor.cs
- TerminatorSinks.cs
- WebSysDisplayNameAttribute.cs
- ShaperBuffers.cs
- _ContextAwareResult.cs
- EnvelopedSignatureTransform.cs
- BadImageFormatException.cs
- InstanceDataCollectionCollection.cs
- SchemaEntity.cs
- TextAdaptor.cs
- IndexedGlyphRun.cs
- QueryableFilterUserControl.cs