删除按钮,按钮代码设置为:
Dim r As Row = Tables("父表").Current
Dim msg As String = "D#" & "父表" & "#" & r("_Identify") & "#" & r("IDD") & "#子表A|子表B|子表C"
r.Delete()
r.Save()
DataTables("子表A").DeleteFor("IDD = '" & r("IDD") & "'")
DataTables("子表A").save
DataTables("子表B").DeleteFor("IDD = '" & r("IDD") & "'")
DataTables("子表B").save
DataTables("子表C").DeleteFor("IDD = '" & r("IDD") & "'")
DataTables("子表C").save
For Each bd As QQBuddy In QQClient.Buddies
If bd.Online Then
QQClient.Send(bd.name, msg)
End If
Next
QQClient的ReceivedMessage事件中修改代码:
……
ElseIf msg.StartsWith("D#") Then '表示删除了行
Dim pts() As String = msg.Split("#")
If pts.Length >= 3 Then
DataTables(pts(1)).RemoveFor("[_Identify] = " & pts(2)) '移除行
End If
If pts.Length = 5 Then
For Each tn As String In pts(4).split("|")
DataTables(tn).DeleteFor("IDD = '" & pts(3) & "'")
Next
End If
End If
[此贴子已经被作者于2019/2/16 16:27:51编辑过]