以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  openQQ审核  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=132091)

--  作者:qinlao666
--  发布时间:2019/3/13 17:18:00
--  openQQ审核

审核按钮命令如下

If User.name = "张良斌" Then
    Dim ids As String = ""
    Dim bhs As String = ""
    Dim rs = Tables("生产计划审核2_计划申请表").GetCheckedRows
    If rs.count=0 Then Return
    Dim name As String = rs(0)("请购人")
    For Each r As Row In rs
        r("审核") = True
        r("审核人") = user.name
        r("审核日期") =  Date.Today()
        r.Save()
        ids &= r("_Identify") & ","
        bhs &= r("请购单号") & ","
    Next
    If ids > "" Then
        msgbox(ids)
        msgbox(name)
        QQClient.Send(name,"-@|"& bhs.trim(",") & "|" & User.Name)
       
    End If
   
Else
    MessageBox.show("你无审核权限!")
End If

 

 

客户端receivedmessage命令

 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

 

现在问题是:批量审核多条数据后,生产计划表没法自动更新,只能是1条1条的审核

请老师赐教批量审核更新的代码,谢谢!


--  作者:有点甜
--  发布时间:2019/3/13 17:29:00
--  

代码改成

 

pts.Length = 3 AndAlso pts(0) = "-@" \'如果是审核通过消息
PopMessage("生产计划" & pts(1) & "已由" & pts(2) & "审核通过!")
Dim filter = "请购单号 in (\'" & pts(1).replace(",", "\',\'") & "\')"

DataTables("生产计划").removefor(filter)
DataTables("生产计划").AppendLoad(filter)

[此贴子已经被作者于2019/3/13 17:29:58编辑过]