以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 移送版 关联表问题 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=113194) |
-- 作者:yifan3429 -- 发布时间:2018/1/10 21:30:00 -- 移送版 关联表问题 有两张表 一张 客户资料表 一张 客户明细表 Select Case e.Path Case "kfbb.htm" wb.AddPageTitle("","pageheader","渠道客户报备","艾迪尔木作事业部") If e.PostValues.Count = 0 Then wb.AddForm("","form1","kfbb.htm") With wb.AddInputGroup("form1","ipg1","基础信息:") .AddInput("日期","报备时间:","date") .AddInput("建档人","报备人:","Text") .AddSelect("客户类别","客户类别","请选择|高端肄业|设计师|终端用户|内部职员|销售经营|其他") .AddInput("客户姓名","客户姓名:","Text") .AddInput("单位名称","单位名称:","Text") .AddInput("职务","职务:","Text") .AddInput("电话","手机:","Text") .AddInput("QQ","QQ:","Text") .AddInput("微信","微信:","Text") .AddInput("邮箱","邮箱:","Text") End With With wb.AddInputGroup("form1","ipg7","备注") .AddTextArea("备注",5).Placeholder = "其他描述!" End With With wb.AddButtonGroup("form1","btg8",True) .Add("btn1", "提交资料", "submit") End With e.WriteString(wb.Build) Else Dim nms() As String = {"客户姓名","职务","电话","微信","单位名称","建档人"} \'不能为空的列名数组 For Each nm As String In nms If e.PostValues.ContainsKey(nm) = False Then \'生成错误提示页 With wb.AddMsgPage("","msgpage","增加失败", nm & "列不能为空!") .icon = "Warn" \'改变图标 .AddButton("btn1","返回").Attribute = "" End With e.WriteString(wb.Build) Return \'必须返回 End If Next nms = New String() {"日期","客户姓名","电话","微信","单位名称","备注","客户类别","职务","建档人","邮箱","QQ" } \'重新定义了nms数组,增加了两列. Dim dr As DataRow = DataTables("客户资料库").AddNew() For Each nm As String In nms If e.PostValues.ContainsKey(nm) Then dr(nm) = e.PostValues(nm) End If Next wb.InsertHTML("您的报备如下,请注意我们的确认信息:<br/>") For Each key As String In e.PostValues.Keys wb.InsertHTML(key & ":" & e.PostValues(key) & "<br/>") Next \'保存并生成增加成功提示页面 dr.save() With wb.AddMsgPage("","msgpage","增加成功", "感谢您的付出,艾迪尔的发展离不开您的付出") \'生成成功提示页 .AddButton("btn1","继续添加","xckc51.htm") End With e.WriteString(wb.Build) End If End Select |
-- 作者:有点甜 -- 发布时间:2018/1/10 21:51:00 -- 你试试使用page容器,把其隐藏起来,需要的时候show出来即可。
http://www.foxtable.com/mobilehelp/scr/0109.htm
|