以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 上面代码,如何修改,才能使指定表中的“状态”列内容修改后,不显示在操作日志中? (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=135739) |
-- 作者:fengwenliuyan -- 发布时间:2019/6/2 16:34:00 -- 上面代码,如何修改,才能使指定表中的“状态”列内容修改后,不显示在操作日志中? 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编辑过]
|
-- 作者:有点甜 -- 发布时间:2019/6/3 9:03:00 --
If e.DataRow.RowState = 2 Or e.DataRow("日志") = False or e.datacol.name = "状态" Then
|