共13 条记录, 每页显示 10 条, 页签:
[1]
[2]
1楼
lihe60 发表于:2024/4/15 9:36:00
If e.PostValues.Count = 0 Then
wb.AddForm("","form1","addnew.htm")
With wb.AddInputGroup("form1","ipg1","增加员工")
.AddInput("姓名","姓名","Text") '前一个"姓名"是ID,后一个"姓名"是标题
.AddInput("年龄","年龄","number")
.AddSelect("学历","学历","大专|本科|硕士|博士")
.AddUploader("up1","照片",True) 'True表示允许上传多个文件
End With
With wb.AddButtonGroup("form1","btg1",True)
.Add("btn1", "确定", "submit")
End With
e.WriteString(wb.Build)
Else
Dim nms() As String = {"订单编号"}
Dim dr As DataRow = DataTables("订单").AddNew()
For Each nm As String In nms
dr(nm) = e.PostValues(nm)
Next
For Each key As String In e.Files.Keys
If key = "up1" Then
For Each fln As String In e.Files(key)
e.SaveFile(key, fln, ProjectPath & "Attachments\" & fln)
Next
dr.Lines("客户") = e.Files(key)
End If
Next
'保存并生成增加成功提示页面
dr.save()
.AddButton("btn1","返回").Attribute = ""
e.WriteString(wb.Build)
End If
点了确定,如何返回当前页?
[此贴子已经被作者于2024/4/15 9:36:58编辑过]
2楼
有点蓝 发表于:2024/4/15 9:46:00
If e.PostValues.Count > 0 Then
Dim nms() As String = {"订单编号"}
Dim dr As DataRow = DataTables("订单").AddNew()
……其它接收数据的处理
end if
wb.AddForm("","form1","addnew.htm")
With wb.AddInputGroup("form1","ipg1","增加员工")
.AddInput("姓名","姓名","Text") '前一个"姓名"是ID,后一个"姓名"是标题
.AddInput("年龄","年龄","number")
.AddSelect("学历","学历","大专|本科|硕士|博士")
.AddUploader("up1","照片",True) 'True表示允许上传多个文件
End With
With wb.AddButtonGroup("form1","btg1",True)
.Add("btn1", "确定", "submit")
End With
e.WriteString(wb.Build)
3楼
lihe60 发表于:2024/4/15 10:03:00
当前页录入的信息没有了。
此主题相关图片如下:无标题.png
[此贴子已经被作者于2024/4/15 10:02:58编辑过]
4楼
有点蓝 发表于:2024/4/15 10:31:00
那就不能使用
submit了,改为ajax:http://www.foxtable.com/mobilehelp/topics/0101.htm
5楼
lihe60 发表于:2024/4/15 13:22:00
Case "addnew.htm"
MessageBox.Show(e.PostValues.count)
If e.PostValues.Count = 0 Then
wb.AddForm("", "form1", "handle.htm") '指定接收表单数据的的页面为handle.htm
With wb.AddInputGroup("form1", "ipg1", "新增订单")
.AddInput("客户", "客户", "text")
.AddInput("日期", "日期", "date")
.AddInput("产品", "产品", "text")
.AddInput("数量", "数量", "number")
.AddInput("单价", "单价", "number").Step = 0.1
End With
With wb.AddButtonGroup("form1", "btg1", True)
.Add("btn1", "确定", "button").Attribute = ""
End With
With wb.AddDialog("", "dlg1", "提示", "增加订单成功,是否继续增加?") '增加订单成功提示框
.AddButton("btnYes", "是").Attribute = ""
.AddButton("btnNo", "否", "http://www.foxtable.com").Kind = 1
End With
With wb.AddDialog("", "dlg2", "错误", "") '增加订单失败提示框
.AddButton("btnOK", "确定")
End With
wb.AppendHTML("<script src='./lib/ajaxform.js'></script>") '引入脚本文件
e.WriteString(wb.Build)
Else
MessageBox.Show(1)
Dim nms() As String = {"客户", "日期", "产品", "数量", "单价"}
For Each nm As String In nms
If e.PostValues.ContainsKey(nm) = False Then
e.WriteString("请输入" & nm & "!") '返回错误消息
Return '必须返回
End If
Next
Dim dr As DataRow = DataTables("订单").AddNew()
For Each nm As String In nms
dr(nm) = e.PostValues(nm)
Next
dr.Save()
e.WriteString("OK") '返回增加成功消息
End If
输入数据后,没有反应。
6楼
有点蓝 发表于:2024/4/15 13:36:00
7楼
lihe60 发表于:2024/4/15 13:41:00
8楼
有点蓝 发表于:2024/4/15 13:45:00
wb.AddForm("", "form1", "addnew.htm")
9楼
lihe60 发表于:2024/4/15 13:55:00
[此贴子已经被作者于2024/4/15 13:55:13编辑过]
10楼
lihe60 发表于:2024/4/15 13:57:00
Case "addnew.htm"
' MessageBox.Show(e.PostValues.count)
If e.PostValues.Count = 0 Then
wb.AddForm("", "form1", "addnew.htm") '指定接收表单数据的的页面为handle.htm
With wb.AddInputGroup("form1", "ipg1", "新增订单")
.AddInput("客户", "客户", "text")
.AddInput("日期", "日期", "date")
.AddInput("产品", "产品", "text")
.AddInput("数量", "数量", "number")
.AddInput("单价", "单价", "number").Step = 0.1
End With
With wb.AddButtonGroup("form1", "btg1", True)
.Add("btn1", "确定", "button").Attribute = ""
End With
With wb.AddDialog("", "dlg1", "提示", "增加订单成功,是否继续增加?") '增加订单成功提示框
.AddButton("btnYes", "是").Attribute = ""
.AddButton("btnNo", "否", "http://www.foxtable.com").Kind = 1
End With
With wb.AddDialog("", "dlg2", "错误", "") '增加订单失败提示框
.AddButton("btnOK", "确定")
End With
wb.AppendHTML("<script src='./lib/ajaxform.js'></script>") '引入脚本文件
e.WriteString(wb.Build)
Else
' MessageBox.Show(1)
Dim nms() As String = {"客户", "日期", "产品", "数量", "单价"}
For Each nm As String In nms
If e.PostValues.ContainsKey(nm) = False Then
e.WriteString("请输入" & nm & "!") '返回错误消息
Return '必须返回
End If
Next
Dim dr As DataRow = DataTables("订单").AddNew()
For Each nm As String In nms
dr(nm) = e.PostValues(nm)
Next
dr.Save()
e.WriteString("OK") '返回增加成功消息
End If
这样改了,没有反应
共13 条记录, 每页显示 10 条, 页签:
[1]
[2]