Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataWebControlsDesign / System / Data / WebControls / Design / EntityDesignerDataSourceView.cs / 2 / 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
- ListItemCollection.cs
- ApplicationInfo.cs
- assemblycache.cs
- XmlChoiceIdentifierAttribute.cs
- WindowsFormsSectionHandler.cs
- DbMetaDataFactory.cs
- ActionFrame.cs
- BamlStream.cs
- DataGridViewRowHeaderCell.cs
- SplineKeyFrames.cs
- ActiveXSite.cs
- KerberosSecurityTokenProvider.cs
- CharacterMetrics.cs
- GroupBoxRenderer.cs
- RequiredAttributeAttribute.cs
- OuterGlowBitmapEffect.cs
- SourceChangedEventArgs.cs
- TypeConstant.cs
- PolyBezierSegment.cs
- NeutralResourcesLanguageAttribute.cs
- HtmlInputPassword.cs
- ColumnWidthChangingEvent.cs
- WmlTextViewAdapter.cs
- EnumBuilder.cs
- InvokePatternIdentifiers.cs
- HoistedLocals.cs
- EntityStoreSchemaGenerator.cs
- X509Certificate.cs
- StylusPointDescription.cs
- BufferedGenericXmlSecurityToken.cs
- CounterSample.cs
- IList.cs
- ExternalFile.cs
- ObjectSpanRewriter.cs
- CounterSampleCalculator.cs
- ValueConversionAttribute.cs
- UndirectedGraph.cs
- WindowsFormsSynchronizationContext.cs
- TextServicesManager.cs
- tibetanshape.cs
- SQLUtility.cs
- IncomingWebRequestContext.cs
- XmlDocumentSurrogate.cs
- ConfigXmlAttribute.cs
- DataGridViewTopRowAccessibleObject.cs
- DbParameterCollection.cs
- XmlDictionaryWriter.cs
- BlockingCollection.cs
- ProjectionPath.cs
- FillRuleValidation.cs
- NotSupportedException.cs
- TypeConstant.cs
- SizeLimitedCache.cs
- StylesEditorDialog.cs
- TableRowCollection.cs
- ScrollEvent.cs
- BamlResourceContent.cs
- ObjRef.cs
- Int64.cs
- DependencyObjectProvider.cs
- SQLInt64Storage.cs
- ApplicationFileParser.cs
- PropertyInformationCollection.cs
- ObjectItemLoadingSessionData.cs
- CultureSpecificCharacterBufferRange.cs
- TreeViewAutomationPeer.cs
- _BufferOffsetSize.cs
- DiffuseMaterial.cs
- DescendantOverDescendantQuery.cs
- DataGridItemEventArgs.cs
- QualifiedCellIdBoolean.cs
- errorpatternmatcher.cs
- XsdBuilder.cs
- StaticDataManager.cs
- Query.cs
- FormsIdentity.cs
- PrintDialogException.cs
- DataListItemCollection.cs
- NamespaceExpr.cs
- XmlCharCheckingReader.cs
- PropertyState.cs
- DurableInstanceManager.cs
- _AcceptOverlappedAsyncResult.cs
- SubMenuStyle.cs
- CachedTypeface.cs
- WebBrowsableAttribute.cs
- TextSearch.cs
- SelectionRange.cs
- ColorAnimationUsingKeyFrames.cs
- HostingEnvironmentException.cs
- MatrixValueSerializer.cs
- ObjectDisposedException.cs
- InvalidProgramException.cs
- Dictionary.cs
- EventLogInformation.cs
- DocumentGridContextMenu.cs
- HtmlAnchor.cs
- DataColumn.cs
- EventProxy.cs
- xmlglyphRunInfo.cs