Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebControls / SqlDataSourceStatusEventArgs.cs / 1305376 / 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;
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.
//
//-----------------------------------------------------------------------------
namespace System.Web.UI.WebControls {
using System;
using System.Collections.Specialized;
using System.Data;
using System.Data.Common;
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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Process.cs
- XmlSerializer.cs
- GridSplitterAutomationPeer.cs
- PageBuildProvider.cs
- AppDomainEvidenceFactory.cs
- StrokeFIndices.cs
- _HelperAsyncResults.cs
- PtsContext.cs
- StringConcat.cs
- TaskHelper.cs
- HighlightComponent.cs
- PrePostDescendentsWalker.cs
- AttributeProviderAttribute.cs
- UTF32Encoding.cs
- Metafile.cs
- WebConfigurationHost.cs
- TableCell.cs
- Interlocked.cs
- ellipse.cs
- TransformPattern.cs
- FixedSOMFixedBlock.cs
- ComponentResourceKey.cs
- DataRecordInternal.cs
- XmlAttributeOverrides.cs
- InterleavedZipPartStream.cs
- XmlDataImplementation.cs
- KnownTypesHelper.cs
- Listbox.cs
- ChtmlTextWriter.cs
- FixUp.cs
- ConfigurationPropertyCollection.cs
- TypeGeneratedEventArgs.cs
- UserControlFileEditor.cs
- WinCategoryAttribute.cs
- DataGridViewCellMouseEventArgs.cs
- DiscardableAttribute.cs
- TileModeValidation.cs
- ScrollProviderWrapper.cs
- DocumentGridPage.cs
- AbsoluteQuery.cs
- ToolStripOverflowButton.cs
- CqlQuery.cs
- CalloutQueueItem.cs
- ItemCollection.cs
- HtmlInputCheckBox.cs
- WebPartMenuStyle.cs
- Condition.cs
- SqlGenerator.cs
- TransactionsSectionGroup.cs
- ColorBlend.cs
- Itemizer.cs
- ExeConfigurationFileMap.cs
- EntityClassGenerator.cs
- Exceptions.cs
- XmlQueryRuntime.cs
- DateTimeConstantAttribute.cs
- MessageSecurityVersion.cs
- BoolLiteral.cs
- SiteOfOriginContainer.cs
- InputMethodStateTypeInfo.cs
- ConfigurationHandlersInstallComponent.cs
- Constraint.cs
- TemplateKeyConverter.cs
- EntityProxyTypeInfo.cs
- DirectoryNotFoundException.cs
- DesignerAutoFormat.cs
- XmlSchemaComplexContentExtension.cs
- Screen.cs
- ListControl.cs
- IndentedWriter.cs
- WindowsFormsHostPropertyMap.cs
- RadioButtonStandardAdapter.cs
- SQLMembershipProvider.cs
- _NegotiateClient.cs
- ErrorTableItemStyle.cs
- SqlException.cs
- XmlSchemaGroup.cs
- SynchronizingStream.cs
- BaseUriHelper.cs
- DLinqAssociationProvider.cs
- DiagnosticTraceSource.cs
- XmlAggregates.cs
- TreeView.cs
- JsonReaderDelegator.cs
- AssemblyInfo.cs
- ObjectSet.cs
- ValidationErrorEventArgs.cs
- DataSourceExpression.cs
- DataGridCellAutomationPeer.cs
- TrustLevelCollection.cs
- SpotLight.cs
- DrawingBrush.cs
- XmlRootAttribute.cs
- XXXInfos.cs
- CodeCommentStatementCollection.cs
- TimeIntervalCollection.cs
- NameScope.cs
- ErrorFormatterPage.cs
- ApplicationSettingsBase.cs
- basecomparevalidator.cs