If e.DataRow.RowState = DataRowState.Added Then
Output.Logs("增加日志").Add(User.Name & "在{" & Date.Now & "} 增加了账单,编号为{" & e.DataRow("账单编号") & "} 单位为{" & e.DataRow("单位名称")& "} 原账单状态为{" & e.DataRow("账单状态")& "} 账单金额为{" & e.DataRow("发生金额")& "}")
ElseIf e.DataRow.RowState = DataRowState.Modified Then
Dim val As String = User.Name & "在{" & Date.Now & "} 增加了账单,编号为{" & e.DataRow("账单编号") & "}"
For Each dc As DataCol In e.DataTable.DataCols
If e.DataRow(dc.name) <> e.DataRow.OriginalValue(dc.name) Then
val = val & "{dc.name}由{" & e.DataRow.OriginalValue(dc.name) & "}改为{" & e.DataRow(dc.name) & "}"
End If
Next
Output.Logs("增加日志").Add(val)
End If