以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 报错 exception has been thrown by the target of an invocation. (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=145073) |
-- 作者:ycwk -- 发布时间:2020/1/7 16:02:00 -- 报错 exception has been thrown by the target of an invocation. Dim e As RequestEventArgs = args(0) Dim wb As New weui If e.GetValues.ContainsKey("pdResult") Then If e.GetValues.ContainsKey("pdResult") And e.GetValues.ContainsKey("sn") Then \'如果Get方式提交过来的参数里同时含有这两个参数,则! Dim dr2 As DataRow= DataTables("盘点记录").AddNew() \'用table新增比datatable好,因为如果有关联表,则关联内容会自动填入 dr2("SN")=e.PostValues("SN") dr2("盘点时间")=Date.Now \'dr2("盘点人")= "王昆" Dim dr_name As DataRow=DataTables("users_Report").SQLFind("[JobNumber]=\'" & e.Cookies("username") & "\'") \'在users_Report表中查找当前工号对应的姓名 dr2("盘点人")=dr_name("Name") If e.GetValues("pdResult")="right" Then dr2("正确")=True Else dr2("正确")=False End If dr2("SN")= e.GetValues("SN") dr2.Save End If e.WriteString("<meta http-equiv=\'Refresh\' c>") \'直接跳转到首页 End If
|
-- 作者:有点蓝 -- 发布时间:2020/1/7 16:05:00 -- If e.GetValues.ContainsKey("pdResult") Then If e.GetValues.ContainsKey("pdResult") And e.GetValues.ContainsKey("sn") Then \'如果Get方式提交过来的参数里同时含有这两个参数,则! Dim dr2 As DataRow= DataTables("盘点记录").AddNew() \'用table新增比datatable好,因为如果有关联表,则关联内容会自动填入 dr2("SN")=e.GetValues("SN") dr2("盘点时间")=Date.Now \'dr2("盘点人")= "王昆" Dim dr_name As DataRow=DataTables("users_Report").SQLFind("[JobNumber]=\'" & e.Cookies("username") & "\'") \'在users_Report表中查找当前工号对应的姓名 if dr_name isnot nothing then dr2("盘点人")=dr_name("Name") |