Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / ndp / fx / src / xsp / System / Web / UI / WebControls / SqlDataSourceStatusEventArgs.cs / 1 / SqlDataSourceStatusEventArgs.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.UI.WebControls {
using System;
using System.Collections.Specialized;
using System.Data;
using System.Data.Common;
using System.Security.Permissions;
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)]
public class SqlDataSourceStatusEventArgs : EventArgs {
private DbCommand _command;
private Exception _exception;
private bool _exceptionHandled;
private int _affectedRows;
public SqlDataSourceStatusEventArgs(DbCommand command, int affectedRows, Exception exception) : base() {
_command = command;
_affectedRows = affectedRows;
_exception = exception;
}
public int AffectedRows {
get {
return _affectedRows;
}
}
public DbCommand Command {
get {
return _command;
}
}
///
/// If an exception was thrown by the command, this property will contain the exception.
/// If there was no exception, the value will be null.
///
public Exception Exception {
get {
return _exception;
}
}
///
/// If you wish to handle the exception using your own logic, set this value to true for it to be ignored by the control.
/// If an exception was thrown and this value remains false, the exception will be re-thrown by the control.
///
public bool ExceptionHandled {
get {
return _exceptionHandled;
}
set {
_exceptionHandled = value;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.UI.WebControls {
using System;
using System.Collections.Specialized;
using System.Data;
using System.Data.Common;
using System.Security.Permissions;
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)]
public class SqlDataSourceStatusEventArgs : EventArgs {
private DbCommand _command;
private Exception _exception;
private bool _exceptionHandled;
private int _affectedRows;
public SqlDataSourceStatusEventArgs(DbCommand command, int affectedRows, Exception exception) : base() {
_command = command;
_affectedRows = affectedRows;
_exception = exception;
}
public int AffectedRows {
get {
return _affectedRows;
}
}
public DbCommand Command {
get {
return _command;
}
}
///
/// If an exception was thrown by the command, this property will contain the exception.
/// If there was no exception, the value will be null.
///
public Exception Exception {
get {
return _exception;
}
}
///
/// If you wish to handle the exception using your own logic, set this value to true for it to be ignored by the control.
/// If an exception was thrown and this value remains false, the exception will be re-thrown by the control.
///
public bool ExceptionHandled {
get {
return _exceptionHandled;
}
set {
_exceptionHandled = value;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SingleAnimationUsingKeyFrames.cs
- GridViewColumnHeaderAutomationPeer.cs
- TreeViewImageKeyConverter.cs
- DrawingImage.cs
- FragmentNavigationEventArgs.cs
- Misc.cs
- Rect3DValueSerializer.cs
- TryCatch.cs
- VirtualPathExtension.cs
- CapabilitiesState.cs
- DataGridItemCollection.cs
- ArgIterator.cs
- SqlConnectionHelper.cs
- DoubleCollectionConverter.cs
- DataError.cs
- GridViewEditEventArgs.cs
- TableLayoutColumnStyleCollection.cs
- X509Certificate2.cs
- BitmapDecoder.cs
- Rotation3DAnimationBase.cs
- IndicFontClient.cs
- WS2007HttpBindingCollectionElement.cs
- WindowsToolbar.cs
- ConversionContext.cs
- DataIdProcessor.cs
- ReaderWriterLock.cs
- FrameworkContextData.cs
- RelationalExpressions.cs
- XmlSchemaRedefine.cs
- TransformerTypeCollection.cs
- DateBoldEvent.cs
- ChannelServices.cs
- PowerModeChangedEventArgs.cs
- COM2ComponentEditor.cs
- DataBoundControlAdapter.cs
- MetadataSerializer.cs
- URLIdentityPermission.cs
- StreamProxy.cs
- Transform3D.cs
- GridViewColumnHeaderAutomationPeer.cs
- ControlType.cs
- _LocalDataStore.cs
- TextReader.cs
- SpeechRecognizer.cs
- Error.cs
- DbParameterHelper.cs
- _DigestClient.cs
- Matrix.cs
- SocketStream.cs
- SiteMapDataSourceView.cs
- PropertyChangedEventManager.cs
- WindowsStatusBar.cs
- PriorityQueue.cs
- Message.cs
- DBDataPermission.cs
- OneToOneMappingSerializer.cs
- NativeMethods.cs
- Decoder.cs
- _FixedSizeReader.cs
- OrderedDictionary.cs
- Rect.cs
- PropertyValue.cs
- ErrorsHelper.cs
- HostExecutionContextManager.cs
- WeakReferenceList.cs
- RadioButtonStandardAdapter.cs
- HandlerMappingMemo.cs
- OdbcDataAdapter.cs
- SqlCachedBuffer.cs
- PropertyItem.cs
- SetStoryboardSpeedRatio.cs
- JsonClassDataContract.cs
- ParameterCollectionEditorForm.cs
- HttpCookiesSection.cs
- MessageHeader.cs
- WindowsTreeView.cs
- NegotiateStream.cs
- PenCursorManager.cs
- SslStream.cs
- InternalConfirm.cs
- LowerCaseStringConverter.cs
- XmlSerializationReader.cs
- XmlAutoDetectWriter.cs
- TreeNodeMouseHoverEvent.cs
- ValueUtilsSmi.cs
- DetailsViewCommandEventArgs.cs
- DocumentXmlWriter.cs
- ExtenderHelpers.cs
- XmlSerializerFactory.cs
- NoneExcludedImageIndexConverter.cs
- DataTableReader.cs
- Array.cs
- BlockExpression.cs
- Point3DCollectionConverter.cs
- PolicyReader.cs
- ProtocolViolationException.cs
- CookielessHelper.cs
- PersistenceProvider.cs
- UnsafePeerToPeerMethods.cs
- HandleRef.cs