Select Case e.Path
Case "addnewxb.htm"
If e.PostValues.Count = 0 Then
wb.AddForm("","form1","addnewxb.htm")
With wb.AddInputGroup("form1","ipg1","增加补货")
.AddSelect("店铺","店铺","|一店|二店|三店|四店")
.AddInput("补货数量","补货数量","number")
'.AddUploader("up1","图片",True)
With .AddUploader("up1","图片",True)
.AllowDelete = True '允许删除
.Incremental = True '允许重复选择文件或连续拍照
.ScaleWidth = 400 '自动压缩图片宽度为400个像素,高度等比例压缩
End With
End With
With wb.AddButtonGroup("form1","btg1",True)
.Add("btn1", "确定", "submit")
.Add("btn2", "重置", "reset") '重置
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() {"店铺","补货数量"}
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 & "xb\" & fln)
Next
dr.Lines("图片") = e.Files(key)
End If
Next
为什么用黄色部分就可以把照片传上去,但是我想增加紫色部分的功能,用紫色部分照片是传不上去
wb.AddForm("","form1","addnewxb.htm")
With wb.AddInputGroup("form1","ipg1","增加补货")
.AddSelect("店铺","店铺","|一店|二店|三店|四店")
.AddInput("补货数量","补货数量","number")
.AddUploader("up1","图片",True)
.AllowDelete = True '允许删除
.Incremental = True '允许重复选择文件或连续拍照
.ScaleWidth = 400 '自动压缩图片宽度为400个像素,高度等比例压缩
End With
这样写呢,又报错,该怎么写呢