Foxtable(狐表)用户栏目专家坐堂 → 动态列表问题


  共有3589人关注过本帖平板打印复制链接

主题:动态列表问题

帅哥,在线噢!
aidimeng
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:三尾狐 帖子:741 积分:7250 威望:0 精华:0 注册:2015/9/14 14:26:00
动态列表问题  发帖心情 Post By:2021/8/11 10:38:00 [只看该作者]

Dim fl As String = "d:\web\" & e.path
If filesys.FileExists(fl)
    Dim idx As Integer = fl.LastIndexOf(".")
    Dim ext As String  = fl.SubString(idx)
    Select Case ext
        Case ".jpg",".gif",".png",".bmp",".wmf",".js",".css" ,".html",".htm",".zip",".rar"
            e.WriteFile(fl)
            Return '这里必须返回
    End Select
End If
Select Case e.Path
    Case "test.htm"
        Dim wb As New weui
        wb.AddForm("","form1","test.htm")
        With wb.AddInputGroup("form1","ipg1","查询条件")
              .AddInput("scrq","生产日期","date")

          
                .Attribute = """
            
            With .AddSelect("cpmc","产品名称","")
                .Attribute = """
            End With
            .AddSelect("gg","规格","")
        End With
        With wb.AddButtonGroup("form1","btg1",True)
            .Add("btn1", "确定", "submit")
        End With
        e.WriteString(wb.Build) '生成网页
    Case  "getProducts.htm"
        Dim vals As String
Dim cmd As new SQLCommand
cmd.C
cmd.CommandText=" elect t1.产品名称,t2.生产日期_开始,t2.规格 f  rom 质检报告主表 t2 inner join 成品有出厂检验 t1 on t1.编号=t2.编号 where t2.生产日期_开始= '"& e.PostValues("scrq") &"'"

 'MessageBox.Show(cmd.CommandText)
Dim dt As DataTable= cmd.ExecuteReader
        If e.PostValues.Count = 1 Then
            vals  = "|" & dt.GetComboListString("产品名称","生产日期_开始='" & e.PostValues("scrq") & "'")
        ElseIf e.PostValues.Count = 2 Then
            Dim Filter As String = "生产日期_开始='" & e.PostValues("scrq") & "' And 产品名称='" & e.PostValues("cpmc") & "'"
            vals = "|" & Dt.GetComboListString("规格", Filter)
        End If
        e.WriteString(vals)
End Select

 

上述代码在执行的时候  选择好了 生产日期后,在产品名称的下拉列表中可以有值,但不能选中


 回到顶部