Select Case e.Path
Case "test.htm"
Dim wb As New weui
With wb.AddTable("","Table1")
Dim lst As new List(of String)
.head.AddRow("出库日期","出库单编号","出库用途","领用部门","领料人")
For Each dr As DataRow In DataTables("出库").DataRows
lst.Clear
For Each s As String In {"出库日期","出库单编号","出库用途","领用部门","领料人"}
lst.Add(dr(s))
Next
.body.AddRow(lst.ToArray).Attribute= "onclick= 'setvalues(""" & dr("出库单编号") & """)'"
Next
End With
wb.AppendHTML("<div id='p1' style='margin:0.5em'></div>") '插入一个div,用于显示服务器返回的 页面
wb.AppendHTML("<script src='./ajaxform.js'></script>") '引入脚本文件
e.WriteString(wb.Build)
Case "test2.htm"
Dim wb As New WeUI
With wb.AddTable("","Table2")
'按日期顺序列出客户CS01的订单,仅显示产品/数量/单价/日期/审核等五列
.CreateFromDataTable(DataTables("出库明细"),False,"出库单编号='" & e.PlainText & "'","","商品类别","商品名称","规格","单位","数量","单价","金额")
End With
e.WriteString(wb.BuildHTML("Table2"))
End Select
[此贴子已经被作者于2021/6/27 23:03:49编辑过]