Dim r As Row = Tables("生产计划").Current
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
QQClient.Send("管理员","+@|" & r("_Identify") & "|" & r("单号") & "|" & User.Name)
3.表格审核列
Dim r As Row = Tables("生产计划").Current
r.Save()
QQClient.Send("开发者","+@|" & r("_Identify") & "|" & r("单号") & "|" & User.Name)
4.OpenQQ客户端的MessageReceived事件
Dim ptls() As String = e.Message.Split("|")
If ptls.Length = 4 AndAlso ptls(0) = "+@" '如果是申请审核消息
fhs.Add(ptls(1) & "|" & ptls(2) & "|" & ptls(3)) '将主健?单号和制单人合成为一个字符串存储在集合中
ElseIf ptls.Length = 3 AndAlso ptls(0) = "-@" '如果是审核通过消息
PopMessage("生产订单" & ptls(1) & "已由" & ptls(2) & "审核通过!")
Dim dr As DataRow = DataTables("生产计划").Find("单号 = '" & ptls(1) & "'")
If dr IsNot Nothing Then
dr.Load
End If
End If
5.新建窗口“审核申请”,查看按钮设置为
DataTables("生产计划").Save() '接下来要根据主键查找,必须先保存,因为只有保存后新增行的主键才是有效值.
Dim id As String = e.Form.Controls("Label2").Text
Dim dr As DataRow = DataTables("生产计划").Find("[_Identify] = " & id)
If dr Is Nothing Then
DataTables("生产计划").AppendLoad("[_Identify] = " & id)
dr = DataTables("生产计划").Find("[_Identify] = " & id)
Else
dr.Load()
End If
If dr IsNot Nothing Then
Dim wz As Integer = Tables("生产计划").FindRow(dr)
If wz < 0 Then '如果因为筛选导致此送货单不可见
Tables("生产计划").Filter = ""
wz =Tables("生产计划").FindRow(dr)
End If
If wz >= 0 Then
Tables("生产计划").Position = wz
Forms("生产计划").Open()
End If
End If
e.Form.Close()
6.SystemIdle
If fhs.Count > 0 AndAlso Forms("审核申请").Opened = False Then
Dim ptls() As String = fhs(0).Split("|")
fhs.RemoveAt(0)
With Forms("审核申请")
.Open()
.Controls("Label1").Text = ptls(2) & "新增生产订单" & ptls(1) & ",请审核!"
.Controls("Label2").Text = ptls(0) '将发货单主健设置为Label2的标题
End With
End If