Foxtable(狐表)用户栏目专家坐堂 → AddGriD链接跳转,求助


  共有2573人关注过本帖树形打印复制链接

主题:AddGriD链接跳转,求助

帅哥哟,离线,有人找我吗?
yifan3429
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:九尾狐 帖子:2466 积分:22761 威望:0 精华:0 注册:2011/3/29 17:14:00
AddGriD链接跳转,求助  发帖心情 Post By:2022/2/13 23:00:00 [只看该作者]

If DataTables.Contains("网页_导航") = False Then '如果表C没有加载
    DataTables.Load("网页_导航") '加载表C
End If
Dim b1 As String
wb.AddPageTitle("","pageheader","湖南城市之窗","全案产品选型库")
'For Each s As String In DataTables("网页_导航").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("网页_导航").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("标题")& b1, r("ico"), r("path"))
        Next
    End With
Next
e.WriteString(wb.Build)


    'If DataTables.Contains("产品库_活动家具") = False Then '如果表C没有加载
        'DataTables.Load("产品库_活动家具") '加载表C
    'End If
    'Dim dr As DataRow = DataTables("网页_导航").SQLFind("链接='" & e.Path & "'  ")
    'If dr IsNot Nothing Then
        'wb.AddPageTitle("","ph1","城市之窗","" & dr("品牌")& " &产品选型库")
        '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("产品库_活动家具").sqlSelect("产品系列 = '"& dr("标题") & "'")
                ''For Each r As DataRow In DataTables("产品库_活动家具").sqlSelect("产品系列 = '"& dr("品牌") & "'" OrElse "产品名称 = '"& dr("品牌") & "' ")
                ''For Each r As DataRow In DataTables("产品库_活动家具").DataRows
                'With .AddList(r("产品系列"),r("商品图片"))
                    'With  .LeftFooter
                        '.AddFoot("订货ID:"& r("产品_定货ID")).Attribute = "style='color:red;font-size:9px'"
                        '.AddFoot("¥ "&r("单价")).Attribute = "style='color:red;font-size:10px'"
                        '.AddFoot("¥ 9999999.00").Attribute = "style='font-size:8px;text-decoration: line-through;'"
                    'End With
                    '.RightFooter.AddFoot("购买").Attribute = " style='color:blue;'"
                    '.RightFooter.AddFoot("详情").Attribute = " style='color:blue;'"
                    ''.RightFooter.AddFoot("标签:11.22.33.44.55.66.77.88.99").Attribute = "style='color:MediumBlue;font-size:10px'End With
            'Next
            'wb.InsertHTML(.BuildHtml)
            'wb.InsertHTML(ExWeUI.WebUI.AddBackTop("bt01").BuildHtml)
            'wb.AppendHTML("<script>initExWeUI();</script>")
        'End With
        'e.WriteString(wb.Build)
    'End If
'End Select

r("path"))黄色部分是动态的合成怎么跳转到明细页呢 请教老师 
[此贴子已经被作者于2022/2/13 23:04:49编辑过]

 回到顶部
帅哥,在线噢!
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:107880 积分:548763 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2022/2/13 23:11:00 [只看该作者]

没看懂,r("path")存储的是什么数据?

 回到顶部
帅哥哟,离线,有人找我吗?
yifan3429
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:九尾狐 帖子:2466 积分:22761 威望:0 精华:0 注册:2011/3/29 17:14:00
  发帖心情 Post By:2022/2/13 23:24:00 [只看该作者]

是一个动态的链接地址
Select Case e.Path 
 Case "1.htm" 
Dim wb As New weui
If DataTables.Contains("网页_导航") = False Then '如果表C没有加载
    DataTables.Load("网页_导航") '加载表C
End If
Dim b1 As String
wb.AddPageTitle("","pageheader","湖南城市之窗","全案产品选型库")
'For Each s As String In DataTables("网页_导航").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("网页_导航").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("标题")& b1, r("ico"), r("path"))
        Next
    End With
Next
e.WriteString(wb.Build)

Case Else
    'If DataTables.Contains("产品库_活动家具") = False Then '如果表C没有加载
        'DataTables.Load("产品库_活动家具") '加载表C
    'End If
    Dim dr As DataRow = DataTables("网页_导航").SQLFind("path='" & e.Path & "'  ")
    If dr IsNot Nothing Then
        wb.AddPageTitle("","ph1","城市之窗","" & dr("品牌")& " &产品选型库")
        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("产品库_活动家具").sqlSelect("产品系列 = '"& dr("标题") & "'")
                'For Each r As DataRow In DataTables("产品库_活动家具").sqlSelect("产品系列 = '"& dr("品牌") & "'" OrElse "产品名称 = '"& dr("品牌") & "' ")
                'For Each r As DataRow In DataTables("产品库_活动家具").DataRows
                With .AddList(r("产品系列"),r("商品图片"))
                    With  .LeftFooter
                        .AddFoot("订货ID:"& r("产品_定货ID")).Attribute = "style='color:red;font-size:9px'"
                        .AddFoot("¥ "&r("单价")).Attribute = "style='color:red;font-size:10px'"
                        .AddFoot("¥ 9999999.00").Attribute = "style='font-size:8px;text-decoration: line-through;'"
                    End With
                    .RightFooter.AddFoot("购买").Attribute = " style='color:blue;'"
                    .RightFooter.AddFoot("详情").Attribute = " style='color:blue;'"
                    '.RightFooter.AddFoot("标签:11.22.33.44.55.66.77.88.99").Attribute = "style='color:MediumBlue;font-size:10px'viewport' c>")
        sb.AppendLine("接收到的数据有:<br/><br/>")
        For Each key As String In e.PostValues.Keys
            sb.AppendLine(key & ":" & e.PostValues(key) & "<br/>")
        Next
        e.WriteString(sb.ToString)
上面的代码独立放在网络监视器是可以实现功能的
如何转接到这句代码上
 Dim dr As DataRow = DataTables("网页_导航").SQLFind("path='" & e.Path & "'  ")


现在用的如下代码,不知道如何跳转链接了
    Select Case e.Path
    Case "testres.htm"
        Dim sb As New StringBuilder
        sb.AppendLine("<meta name='viewport' c>")
        sb.AppendLine("接收到的数据有:<br/><br/>")
        For Each key As String In e.PostValues.Keys
            sb.AppendLine(key & ":" & e.PostValues(key) & "<br/>")
        Next
        e.WriteString(sb.ToString)
    Case Else
        Dim p As String = e.Path
        If p = "" Then p = "*"
        Dim dr As DataRow = DataTables("网页_顶层导航").SQLFind("path='" & p & "' or '" & p & "' like path ")
        If dr IsNot Nothing Then
            Functions.Execute(dr("标题"),e)
        Else
            Dim wb As New weui
            wb.InsertHTML("<p>杯具!页面丢失了!! 联系渡哥吧!15116235557 </p>")
            wb.AppendHTML("<script>console.warn('" & e.Path & "不在httprequest表,请检查是否没有设置.')</script>")
            e.WriteString(wb.Build)
        End If
End Select
[此贴子已经被作者于2022/2/13 23:35:18编辑过]

 回到顶部
帅哥,在线噢!
有点蓝
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:107880 积分:548763 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2022/2/14 8:34:00 [只看该作者]

请上传实例测试

 回到顶部
帅哥哟,离线,有人找我吗?
yifan3429
  5楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:九尾狐 帖子:2466 积分:22761 威望:0 精华:0 注册:2011/3/29 17:14:00
  发帖心情 Post By:2022/2/15 12:53:00 [只看该作者]


图片点击可在新窗口打开查看此主题相关图片如下:9a0580c43a0123abd48f30e741b5afd5.jpg
图片点击可在新窗口打开查看
主页面上有三个不同的分组
分组下面的链接分别渠道不同的页面
目前只能往一个链接指向
请老师协助
 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:网页动态测试.foxdb



 回到顶部
帅哥,在线噢!
有点蓝
  6楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:107880 积分:548763 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2022/2/15 14:00:00 [只看该作者]

这个意思?

 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:网页动态测试.zip



 回到顶部
帅哥哟,离线,有人找我吗?
yifan3429
  7楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:九尾狐 帖子:2466 积分:22761 威望:0 精华:0 注册:2011/3/29 17:14:00
  发帖心情 Post By:2022/2/15 14:37:00 [只看该作者]

老师,不对的

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编辑过]

 回到顶部
帅哥,在线噢!
有点蓝
  8楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:107880 积分:548763 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2022/2/15 15:01:00 [只看该作者]

就是6楼的意思,把标题也放到表格里,根据查询的结果,动态改标题即可,和case else没有什么关系

wb.AddPageTitle("","ph1","测试网页","" & dr("function") & dr("分类或者标题列"))

 回到顶部
帅哥哟,离线,有人找我吗?
yifan3429
  9楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:九尾狐 帖子:2466 积分:22761 威望:0 精华:0 注册:2011/3/29 17:14:00
  发帖心情 Post By:2022/2/15 15:37:00 [只看该作者]

原本标题就是在表格里面的。现在是如果主页面做一个分类是没问题的,但是多个分类就不知道怎么样子去链接了,会出现没有列表项的提示

 回到顶部
帅哥,在线噢!
有点蓝
  10楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:107880 积分:548763 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2022/2/15 15:49:00 [只看该作者]

多个分类想要怎么链接?请举例说明

 回到顶部