老师,不对的
Case "1123.htm"
Dim b1 As String
wb.AppendHTML("<link rel='stylesheet' href='./weui/exweui.css'/>",True)
wb.AppendHTML("<script src='./weui/exweui.js' ></script>",True)
For Each s As String In DataTables("http").getvalues("分类","", "排序")
'For Each s As String In DataTables("http").getvalues("分类","[分类] = '按客户分类'", "排序")
'For Each s As String In DataTables("网页_导航").SQLgetvalues("分类","分类 <> '首页'", "排序")
wb.InsertHTML("<h3 align='center' style='margin-top:10px'>" & s & "</h3>")
With wb.AddGrid("","g" & s)
For Each r As DataRow In DataTables("http").sqlSelect("分类='" & s & "'","", "数量 Desc")
With ExWeUI.WebUI.AddBadge("",r("数量"))
'.Square=True '显示为方型
.Attribute="style='background-color: rgb(169,169,169);color:rgb(248,248,255);'" '自定义背景色和文字颜色
b1 = .BuildHtml
End With
.Add("c2",r("function")& b1, r("ico"), r("path"))
Next
End With
Next
wb.AppendHTML("<script>initExWeUI();</script>")
e.WriteString(wb.Build)
下面的实际是根据分组不同,调准到不同的筛选条件。通过 Case Else 只能去到一个筛选条件。
Case Else 1
Dim dr As DataRow = DataTables("http").SQLFind("path='" & e.Path & "' ")
If dr IsNot Nothing Then
wb.AddPageTitle("","ph1","测试网页","" & dr("function")& " 客户列表")
wb.AppendHTML("<link rel='stylesheet' href='./weui/exweui.css'/>",True)
wb.AppendHTML("<script src='./weui/exweui.js' ></script>",True)
With ExWeUI.WebUI.AddListGroup("","lst01",2)
'For Each r As DataRow In DataTables("订单").Select("客户 = '"& dr("path") & "'")
For Each r As DataRow In DataTables("订单").DataRows
With .AddList("产品编号:" & r("产品"),"http://yifan9108.oicp.net/city-pic$/make/end.gif")
With .LeftFooter
.AddFoot("单价 ¥ "&r("单价")).Attribute = "style='color:red;font-size:10px'"
.AddFoot("原价 ¥ "&r("单价")).Attribute = "style='font-size:8px;text-decoration: line-through;'"
End With
End With
Next
wb.InsertHTML(.BuildHtml)
End With
End If
wb.AppendHTML("<script>initExWeUI();</script>")
e.WriteString(wb.Build)
Case Else 2
Dim dr As DataRow = DataTables("http").SQLFind("path='" & e.Path & "' ")
If dr IsNot Nothing Then
wb.AddPageTitle("","ph1","测试网页","" & dr("function")& " 雇员列表")
wb.AppendHTML("<link rel='stylesheet' href='./weui/exweui.css'/>",True)
wb.AppendHTML("<script src='./weui/exweui.js' ></script>",True)
With ExWeUI.WebUI.AddListGroup("","lst01",2)
For Each r As DataRow In DataTables("订单").DataRows
With .AddList("产品编号:" & r("产品"),"http://yifan9108.oicp.net/city-pic$/make/end.gif")
With .LeftFooter
.AddFoot("单价 ¥ "&r("单价")).Attribute = "style='color:red;font-size:10px'"
.AddFoot("原价 ¥ "&r("单价")).Attribute = "style='font-size:8px;text-decoration: line-through;'"
End With
End With
Next
wb.InsertHTML(.BuildHtml)
End With
End If
wb.AppendHTML("<script>initExWeUI();</script>")
e.WriteString(wb.Build)
.Add("c2",r("function")& b1, r("ico"), r("path"))
如何传达给下面代码,让他理解,跟他没关系就就换下一个代码执行,知道找到对应的条件打开网页
Dim dr As DataRow = DataTables("http").SQLFind("path='" & e.Path & "' ")
[此贴子已经被作者于2022/2/15 14:40:11编辑过]