Dim r As Row = Tables("派工").Current
If r IsNot Nothing Then
Dim p As String = IIF(r.DataRow.RowState = DataRowState.Added, "A#", IIF(r.DataRow.RowState = DataRowState.Modified , "U#", ""))
If p > "" Then \'不是新增或者修改的没有必要同步
r.Save()
\'一定要在保存后合成信息,因为新增行的主键在保存后才生成
Dim msg As String = p & "派工" & "#" & r("_Identify")
msgbox(msg)
For Each bd As QQBuddy In QQClient.Buddies
If bd.Online Then
msgbox(bd.name)
QQClient.Send(bd.name, msg)
End If
Next
End If
End If