|
[Visual
Basic]
Protected Overrides Function CreateRowUpdatedEvent(dataRow As DataRow,
command As IDbCommand, statementType As StatementType, tableMapping As
DataTableMapping) As RowUpdatedEventArgs
Return New TemplateRowUpdatedEventArgs(dataRow, command,
statementType, tableMapping)
End Function
Protected Overrides Function CreateRowUpdatingEvent(dataRow As DataRow,
command As IDbCommand, statementType As StatementType, tableMapping As
DataTableMapping) As RowUpdatingEventArgs
Return New TemplateRowUpdatingEventArgs(dataRow, command,
statementType, tableMapping)
End Function
Protected Overrides Sub OnRowUpdating(value As RowUpdatingEventArgs)
Dim handler As TemplateRowUpdatingEventHandler =
CType(Events(EventRowUpdating), TemplateRowUpdatingEventHandler)
If Not handler Is Nothing And value.GetType() Is
Type.GetType("TemplateRowUpdatingEventArgs") Then
handler(Me, CType(value, TemplateRowUpdatingEventArgs))
End If
End Sub
Protected Overrides Sub OnRowUpdated(value As RowUpdatedEventArgs)
Dim handler As TemplateRowUpdatedEventHandler =
CType(Events(EventRowUpdated), TemplateRowUpdatedEventHandler)
If Not handler Is Nothing And value.GetType() Is
Type.GetType("TemplateRowUpdatedEventArgs") Then
handler(Me, CType(value, TemplateRowUpdatedEventArgs))
End If
End Sub
[C#]
override protected RowUpdatedEventArgs CreateRowUpdatedEvent(DataRow
dataRow, IDbCommand command, StatementType statementType, DataTableMapping
tableMapping)
{
return new TemplateRowUpdatedEventArgs(dataRow, command,
statementType, tableMapping);
}
override protected RowUpdatingEventArgs CreateRowUpdatingEvent(DataRow
dataRow, IDbCommand command, StatementType statementType, DataTableMapping
tableMapping)
{
return new TemplateRowUpdatingEventArgs(dataRow, command,
statementType, tableMapping);
}
override protected void OnRowUpdating(RowUpdatingEventArgs value)
{
TemplateRowUpdatingEventHandler handler = (TemplateRowUpdatingEventHandler)
Events[EventRowUpdating];
if ((null != handler) && (value is
TemplateRowUpdatingEventArgs))
{
handler(this, (TemplateRowUpdatingEventArgs) value);
}
}
override protected void OnRowUpdated(RowUpdatedEventArgs value)
{
TemplateRowUpdatedEventHandler handler = (TemplateRowUpdatedEventHandler)
Events[EventRowUpdated];
if ((null != handler) && (value is
TemplateRowUpdatedEventArgs))
{
handler(this, (TemplateRowUpdatedEventArgs) value);
}
}
|