dt1 = cmd1.ExecuteReader(True) '要找到并在表中写入数据,需将参数设置为True
If dt1.DataRows.Count > 0 Then '查找到这一行
xjxm = dt1.dataRows(0)("姓名")
xjid = dt1.dataRows(0)("USERID")
End If
msgbox(“xjid=” & xjid)
'''获取被访人姓名和电话
Dim bfrxm As String
Dim bfrid As String
Dim cmd2 As new SQLCommand
cmd2.C
Dim dt2 As DataTable
cmd2.CommandText = "select * From 人员编号 where 编号电话= '" & e.Values("被访人电话") & "'" '查找身份证号,避免重复
dt2 = cmd2.ExecuteReader(True)
If dt2.DataRows.Count > 0 Then
bfrxm = dt2.dataRows(0)("姓名")
bfrid = dt2.dataRows(0)("USERID")
'生成来访审批流程
Dim lfdjcs As String
……
msgbox(1)
Dim ur As String = "https://qyapi.weixin.qq.com/cgi-bin/oa/applyevent?access_token={0}"
Dim dr2 As DataRow = DataTables("微信应用管理参数表").SQLFind("agentid=1000004")
Dim hc As new HttpClient(Cexp(ur,dr2("accesstoken")))
Dim st As New Date(1970,1,1,8,0,0)
Dim timestamp As Integer = CInt((Date.Now - st).TotalSeconds()) '时间戳
'--------生成JSON语句
Dim jo As New JObject
Dim ja2 As New JArray
jo("creator_userid") =xjid ''校警ID
msgbox(“creator_userid=” & jo("creator_userid").tostring)……
msgbox(jo.Tostring)
Dim job As JObject = JObject.Parse(jo.Tostring)
hc.Content = job.ToString
msgbox(hc.Content)
Dim ret As String = hc.GetData()
msgbox(ret )
[此贴子已经被作者于2022/11/5 9:24:06编辑过]