DataRowDeleted 代码
Dim cmd As New SQLCommand
cmd.CommandText = "SELECT * Fr om {数据操作日志} Where [_Identify] Is Null"
Dim dt As DataTable = cmd.ExecuteReader(True)
Dim dr As DataRow = dt.AddNew
dr("ID") = e.DataRow("_Identify")
dr("用户") = _UserName
dr("涉及表") = e.DataTable.Name
dr("涉及行") = e.DataRow("_Identify")
dr("修改时间") = Date.Now
dr("操作") = "删除了一行"
Dim str As String = ""
For Each c As DataCol In e.DataTable.DataCols
str += c.Name & "=" & e.DataRow(c.Name) & "|"
Next
dr("原行数据") = str
AfterOpenProject 代码
For Each dt As DataTable In DataTables
dt.GlobalHandler.DataColChanged = True
dt.GlobalHandler.DataRowAdded = True
dt.GlobalHandler.DataRowDeleted = True
Next
请老师指点错在哪?谢谢
[此贴子已经被作者于2019/3/21 14:49:46编辑过]