Dim e As RequestEventArgs = args(0)
Dim wb As New weui
\'wb.InsertHTML("<div data-theme=\'g\' data-role=\'page\' data-position=\'fixed\'>") \'页内容样式
\'msgbox(e.PostValues("AssetNumber"))
If e.PostValues.ContainsKey("AssetNumber") Then
msgbox("老样子")
Dim dr1 As DataRow= DataTables("资产管理表").SQLFind("IP地址 = \'" & e.PostValues("AssetNumber") & "\'")
If dr1 IsNot Nothing Then
wb.AddForm("","form1","CheckPd.htm")
With wb.AddInputGroup("form1","ipg1","请核对资料")
.AddInput("zcmc","资产名称","text").Value=dr1("资产名称")
.AddInput("zcgs","资产归属","text").Value=dr1("资产归属")
.AddInput("cgxm","采购项目","text").Value=dr1("采购项目")
\' .AddInput("pw","密码","password")
End With
With wb.AddButtonGroup("","btg1", False) \'水平排列的两个按钮 分组号为btg2
.Add("btn6", "盘点保存","submit","./CheckPd.htm").Kind= 1
.Add("btn7", "放弃保存","button","./pdScan.htm").Kind =2
End With
e.WriteString(wb.Build)
Else
e.WriteString("不存在数据!")
End If
Else
msgbox("有数据保存")
Dim dr2 As DataRow= DataTables("盘点记录").AddNew() \'用table新增比datatable好,因为如果有关联表,则关联内容会自动填入
dr2("资产编号")=e.PostValues("zcmc")
dr2("盘点时间")=Date.Now
dr2("盘点人")= "王昆"
End If