现在点保存按钮后,没有消息提示框弹出。麻烦老师修改下,谢谢!
1,保存按钮
Dim ids As String = ""
Dim bhs As String = ""
For Each r As Row In Tables("计划申请表").rows
If r("审核") = False Then
r.Save()
ids &= r("_Identify") & ","
bhs &= r("请购单号") & ","
End If
Next
If ids > "" Then
QQClient.Send("生产部.江雪虹", User.Name & "|+@|" & ids.trim(",") & "|" & bhs.trim(",") ,True)
End If
2,审核按钮
If user.name = "江雪虹" Then
Dim r As Row = Tables("计划申请表").Current
r("审核") = True
r("审核人") = User.Name
r("审核日期") = Date.Today()
r.Save()
QQClient.Send(r("请购人"), "-@|" & r("请购单号") & "|" & User.Name)
Else
MessageBox.show("你无审核权限!")
End If
Dim ids As String = ""
Dim bhs As String = ""
For Each r1 As Row In Tables("计划申请表").rows
If r1("审核") = True And r1("审批") = False Then
ids &= r1("_Identify") & ","
bhs &= r1("请购单号") & ","
End If
Next
If ids > "" Then
QQClient.Send("财务部.吴连英","+@|" & ids.trim(",") & "|" & bhs.trim(",") & "|" & User.Name,True)
End If
3,审批按钮
If user.name = "吴连英" Then
Dim r As Row = Tables("计划申请表").Current
r("审批") = True
r("审批人") = User.Name
r("审批日期") = Date.Today()
r.Save()
QQClient.Send(r("请购人"), User.Name & "|-@|" & r("请购单号") )
Else
MessageBox.show("你无审批权限!")
End If
4,项目事件中的systemIdle
If user.name = "江雪虹" Then
If fhs.Count > 0 AndAlso Forms("计划审核").Opened = False Then
Dim pts() As String = fhs(0).Split("|")
fhs.RemoveAt(0)
With Forms("计划审核")
.Open()
.Controls("Label1").Text = pts(0) & "新增计划申请单" & pts(3) & ",请审核!"
.Controls("Label2").Text = pts(2) '将发货单主健设置为Label2的标题
End With
End If
End If
If user.name = "吴连英" Then
If fhs.Count > 0 AndAlso Forms("计划审批").Opened = False Then
Dim pts1() As String = fhs(0).Split("|")
fhs.RemoveAt(0)
With Forms("计划审批")
.Open()
.Controls("Label1").Text = pts1(2) & "新增计划申请单" & pts1(1) & ",请审批!"
.Controls("Label2").Text = pts1(0) '将发货单主健设置为Label2的标题
End With
End If
End If
5,客户端receivedmessage
Dim pts() As String = e.Message.Split("|")
If pts.Length = 4 AndAlso pts(0) = user.name '如果是申请审核消息
fhs.Add(pts(2) & "|" & pts(3) & "|" & pts(0)) '将主健?单号和制单人合成为一个字符串存储在集合中
ElseIf pts.Length = 4 AndAlso pts(0) = "+@"
fhs.Add(pts(1) & "|" & pts(2) & "|" & pts(3)) '将主健?单号和制单人合成为一个字符串存储在集合中
ElseIf pts.Length = 3 AndAlso pts(0) = "-@" '如果是审核通过消息
PopMessage("计划申请表" & pts(1) & "已由" & pts(2) & "审核通过!")
Dim dr As DataRow = DataTables("计划申请表").Find("请购单号 = '" & pts(1) & "'")
If dr IsNot Nothing Then
dr.Load
End If
ElseIf pts.Length = 3 AndAlso pts(0) = user.name '如果是审核通过消息
PopMessage("计划申请表" & pts(1) & "已由" & pts(0) & "审批通过!")
Dim dr As DataRow = DataTables("计划申请表").Find("请购单号 = '" & pts(1) & "'")
If dr IsNot Nothing Then
dr.Load
End If
End If