全局表事件的DataColChanged事件,希望对修改过的列记录下来
If e.DataTable.Name <> "系统操作日志" Then
If e.DataRow.RowState = 2 Then
Return
Else
Dim da As Date = Date.Now()
Dim da1 As Date = da.AddMinutes(1)
Dim da2 As Date = da.AddMinutes(-1)
Dim dr1 As DataRow
dr1 = DataTables("系统操作日志").Find("用户 = \'" & _UserName & "\' and 操作表 = \'" & e.DataTable.Name & "\' and 操作列 = \'" & e.DataCol.Name & "\' and 时间 <= \'" & da1 & "\' and 时间 >= \'" & da2 & "\'","时间 Desc")
If dr1 Is Nothing Then
If e.DataCol.Name <> "审核" Then
Dim dr As DataRow = DataTables("系统操作日志").AddNew()
dr("用户") = _UserName
dr("操作表") = e.DataTable.Name
dr("操作列") = e.DataCol.Name
dr("时间") = Date.Now
End If
End If
End If
End If