以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 取数不到 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=151081) |
-- 作者:yetle -- 发布时间:2020/6/15 8:58:00 -- 取数不到 Select Case e.Path Case "sg.htm" wb.AddForm("","form1","sg.htm") With wb.AddInputGroup("form1","ipg1","费用申请") .AddInput("sq","申请人","申请人").value=e.Cookies("name") With .AddSelect("fybm","费用部门","|" & DataTables("组织结构").GetComboListString("部门")) ’在这里获取到了费用部门 .Attribute = """ End With .AddSelect("zx","中心","") With .AddSelect("kmmc","科目名称","|" & DataTables("预算编制").GetComboListString("科目名称")) \'With .AddSelect("kmmc","科目名称","|" & DataTables("预算编制").GetComboListString("科目名称","预算部门=\'" & e.Values("fybm") & "\'")) ’在预算编制表里获取科目名称,不加条件"预算部门=\'" & e.Values("fybm") & "\'"可以获取到数据,加了这个条件就获取不到,是为什么? .Attribute = """ End With .AddSelect("kmdh","科目代号","") End With With wb.AddButtonGroup("form1","btg1",True) .Add("btn1", "确定", "submit") End With e.WriteString(wb.Build) \'生成网页 End Select Select Case e.Path Case "ysbz.htm" Dim Filter As String = "科目名称=\'" & e.PostValues("kmmc") & "\'" \'Dim Filter As String = "科目名称=\'" & e.PostValues("kmmc") & "\' and 预算部门=\'" & e.PostValues("fybm") & "\'" 同样这里加了预算部门的的条件也获取不到科目名称,是怎么回事 Dim ppdh As String = DataTables("预算编制").GetComboListString("科目代号",Filter) e.WriteString(ppdh) End Select |
-- 作者:有点蓝 -- 发布时间:2020/6/15 9:27:00 -- 参考:http://www.foxtable.com/mobilehelp/topics/0096.htm With .AddSelect("fybm","费用部门","|" & DataTables("组织结构").GetComboListString("部门")) ’在这里获取到了费用部门 .Attribute = "onchange=""setAjaxOptions(\'kmmc\',\'ysbz.htm\',\'fybm\',false)""" End With With .AddSelect("kmmc","科目名称","") …… Select Case e.Path Case "ysbz.htm" Dim Filter As String = "预算部门=\'" & e.PostValues("fybm") & "\'" 同样这里加了预算部门的的条件也获取不到科目名称,是怎么回事 Dim ppdh As String = "|" & DataTables("预算编制").GetComboListString("科目名称",Filter) e.WriteString(ppdh) End Select |
-- 作者:yetle -- 发布时间:2020/6/15 10:44:00 -- 不好意思,我之前表述不够完整,我这里是有两个传递需求 ,一个是通过费用部门获取费用中心,同时获取科目名称和科目代号;另一个是通过选择不同的科目名称获取对应的科目代号 按照老师给的帮助修改了一下:加了颜色填充的代码后中心获取不到了,科目名称可以获取到,需要同时获取到费用中心和科目名称以及科目代号,同时又可以通过选择不同科目名称获取科目代号,怎么写? Select Case e.Path Case "sg.htm" wb.AddForm("","form1","sg.htm") With wb.AddInputGroup("form1","ipg1","费用申请") .AddInput("sq","申请人","申请人").value=e.Cookies("name") With .AddSelect("fybm","费用部门","|" & DataTables("组织结构").GetComboListString("部门")) .Attribute = "onch ange=""setAjax Options(\'zx\',\'sgzx.htm\',\'sqr\',\'fybm\',false)""" .Attribute = "onch ange=""setAjax Options(\'kmmc\',\'ysbz.htm\',\'sqr\',\'fybm\',false)""" End With .AddSelect("zx","中心","") .AddSelect("kmmc","科目名称","") .AddSelect("kmdh","科目代号","") End With With wb.AddButtonGroup("form1","btg1",True) .Add("btn1", "确定", "submit") End With e.WriteString(wb.Build) \'生成网页 End Select Select Case e.Path Case "sgzx.htm" Dim pps As String = DataTables("组织结构").GetComboListString("中心","部门=\'" & e.PostValues("fybm") & "\'") e.WriteString(pps) End Select Select Case e.Path Case "ysbz.htm" Dim ppdh As String = DataTables("预算编制").GetComboListString("科目名称"," 预算部门=\'" & e.PostValues("fybm") & "\'") e.WriteString(ppdh) End Select [此贴子已经被作者于2020/6/15 10:57:55编辑过]
|
-- 作者:有点蓝 -- 发布时间:2020/6/15 10:52:00 -- 论坛屏蔽了Attribute 代码,处理方法:http://foxtable.com/bbs/dispbbs.asp?boardid=2&Id=69632 重新贴出代码
|
-- 作者:yetle -- 发布时间:2020/6/15 10:58:00 -- 不好意思,我之前表述不够完整,我这里是有两个传递需求 ,一个是通过费用部门获取费用中心,同时获取科目名称和科目代号;另一个是通过选择不同的科目名称获取对应的科目代号 按照老师给的帮助修改了一下:加了颜色填充的代码后中心获取不到了,科目名称可以获取到,需要同时获取到费用中心和科目名称以及科目代号,同时又可以通过选择不同科目名称获取科目代号,怎么写? Select Case e.Path Case "sg.htm" wb.AddForm("","form1","sg.htm") With wb.AddInputGroup("form1","ipg1","费用申请") .AddInput("sq","申请人","申请人").value=e.Cookies("name") With .AddSelect("fybm","费用部门","|" & DataTables("组织结构").GetComboListString("部门")) .Attribute = "onch ange=""setAjax Options(\'zx\',\'sgzx.htm\',\'sqr\',\'fybm\',false)""" .Attribute = "onch ange=""setAjax Options(\'kmmc\',\'ysbz.htm\',\'sqr\',\'fybm\',false)""" End With .AddSelect("zx","中心","") .AddSelect("kmmc","科目名称","") .AddSelect("kmdh","科目代号","") End With With wb.AddButtonGroup("form1","btg1",True) .Add("btn1", "确定", "submit") End With e.WriteString(wb.Build) \'生成网页 End Select Select Case e.Path Case "sgzx.htm" Dim pps As String = DataTables("组织结构").GetComboListString("中心","部门=\'" & e.PostValues("fybm") & "\'") e.WriteString(pps) End Select Select Case e.Path Case "ysbz.htm" Dim ppdh As String = DataTables("预算编制").GetComboListString("科目名称"," 预算部门=\'" & e.PostValues("fybm") & "\'") e.WriteString(ppdh) End Select |
-- 作者:有点蓝 -- 发布时间:2020/6/15 11:31:00 -- With .AddSelect("fybm","费用部门","|" & DataTables("组织结构").GetComboListString("部门")) .Attribute = "onch ange=""setAjax Options(\'zx\',\'sgzx.htm\',\'sqr\',\'fybm\',false);setAjax Options(\'kmmc\',\'ysbz.htm\',\'sqr\',\'fybm\',false)""" End With
|
-- 作者:yetle -- 发布时间:2020/6/16 9:32:00 -- Select Case e.Path Case "sg.htm" wb.AddForm("","form1","sg.htm") With wb.AddInputGroup("form1","ipg1","费用申请") .AddInput("sq","申请人","申请人").value=e.Cookies("name") With .AddSelect("fybm","费用部门","|" & DataTables("组织结构").GetComboListString("部门")) .Att ribute = "on change=""set AjaxOptions(\'zx\',\'sgzx.htm\',\'sqr\',\'fybm\',false);setAjaxOptions(\'kmmc\',\'ysbz.htm\',\'sqr\',\'fybm\',false);setAjaxOptions(\'kmdh\',\'kmdh.htm\',\'fybm\',\'kmmc\',false)""" \'通过费用部门获取费用中心,同时获取科目名称和科目代号,这个已经可以了! End With .AddSelect("zx","中心","") .AddSelect("kmmc","科目名称","") With.AddSelect("kmdh","科目代号","") .Att ribute = "on change=""set AjaxOptions(\'kmdh\',\'kmdh.htm\',\'fybm\',\'kmmc\',false)""" 另一个是通过选择不同的科目名称获取对应的科目代号 ,这个还不行? End With End With With wb.AddButtonGroup("form1","btg1",True) .Add("btn1", "确定", "submit") End With e.WriteString(wb.Build) \'生成网页 End Select |
-- 作者:有点蓝 -- 发布时间:2020/6/16 10:04:00 -- .AddSelect("zx","中心","") .AddSelect("kmmc","科目名称","").Att ribute = "on change=""set AjaxOptions(\'kmdh\',\'kmdh.htm\',\'fybm\',\'kmmc\',false)""" With.AddSelect("kmdh","科目代号","") 另一个是通过选择不同的科目名称获取对应的科目代号 ,这个还不行? End With
|
-- 作者:yetle -- 发布时间:2020/6/17 9:17:00 -- .AddSelect("zx","中心","").Attribute = """ .AddHiddenValue("中心审批人","zxspr") Select Case e.Path Case "zxspr.htm" Dim pdzxr As String = DataTables("组织结构").GetComboListString("中心负责人"," 中心=\'" & e.PostValues("zx") & "\'") e.WriteString(pdzxr) End Select 老师,如果是AddHiddenValue,获取中心审批人是这么写吗?测试获取不到呢 |
-- 作者:有点蓝 -- 发布时间:2020/6/17 9:51:00 -- 没看懂要干嘛?如果要直接取AddHiddenValue的值,这样:e.PostValues("中心审批人") |