if r isnot nothing then Dim p As String = IIF(r.DataRow.RowState = DataRowState.Added, "A#", "U#") r.Save() '一定要在保存后合成信息,因为新增行的主键在保存后才生成 Dim msg As String = p & "派工" & "#" & r("_Identify") For Each bd As QQBuddy In QQClient.Buddies If bd.Online Then QQClient.Send(bd.name, msg) End If Next