Dim cmd As New SQLCommand
cm d.con nection name = "XX区"
Dim dt As DataTable = cmd.ExecuteReader(True)
Select Case e.DataTable.Name
Case "入库订单表"
If e.DataRow.RowState = 2 Or e.DataRow("日志") = False Then
Return
Else
Dim dr As DataRow = DataTables("操作日志").AddNew
dr("ID") = e.DataRow("_Identify")
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(c.Name) & "】,【"
str += c.Name & "=" & e.DataRow.OriginalValue(c.Name) & "】,【"
str1 += c.Name & "=" & e.DataRow(c.Name) & "】,【"
Next
dr("原行数据") = str
dr("改后数据") = str1
End If
End Select
上面代码,如何修改,才能使指定表中的“状态”列内容修改后,不显示在操作日志中?
[此贴子已经被作者于2019/6/2 16:36:00编辑过]