Dim e = args(0)
If e.DataTable.Name <> "数据操作日志" Then
If e.DataRow.RowState = 2 Then
Return
Else
Dim dr As DataRow = DataTables("数据操作日志").AddNew
dr("uuid") = e.DataRow("uuid")
dr("用户") = User.Name
dr("涉及表") = e.DataTable.Name
dr("涉及列") = e.DataCol.Name
dr("涉及行") = e.DataRow("_Identify")
dr("时间") = Date.Now
dr("操作内容") = """" & e.OldValue & """ 改成了 """ & e.NewValue & """"
Dim str As String = ""
Dim str1 As String = ""
For Each c As DataCol In e.DataTable.DataCols
str += "[" & c.Name & "]=" & e.DataRow.OriginalValue(c.Name) & "|"
str1 += "[" & c.Name & "]=" & e.DataRow(c.Name) & "|"
Next
dr("原始数据") = str
dr("改后数据") = str1
End If
End If
全局表datacolchanged代码
Functions.Execute("xx函数",e)