以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- Uploader上传不报错 但是文件没有上传 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=190071) |
-- 作者:yifan3429 -- 发布时间:2024/1/14 23:17:00 -- Uploader上传不报错 但是文件没有上传 Dim e As RequestEventArgs = args(0) Dim wb As New weui Select Case e.Path Case "yanfacpdata" If e.PostValues.Count = 0 Then wb.AddForm("", "form1", "yanfacpdata") With wb.AddInputGroup("form1", "ipg1", "增加员工") .AddUploader("up1", "照片", True) \'True表示允许上传多个文件 End With With wb.AddButtonGroup("form1", "btg1", True) .Add("btn1", "确定", "submit") End With MessageBox.show(1) \' e.WriteString(wb.Build) Else MessageBox.show(2) 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 End If Next \'保存并生成增加成功提示页面 With wb.AddMsgPage("", "msgpage", "增加成功", "好好学习,天天向上") \'生成成功提示页 .AddButton("btn1", "继续增加", "yanfacpdata") End With End If e.WriteString(wb.Build) End Select
|
-- 作者:有点蓝 -- 发布时间:2024/1/15 8:30:00 -- If e.PostValues.Count = 0 Then 改为 If e.PostValues.Count = 0 andalso e.Files.Keys.count = 0 Then
|
-- 作者:shunchang -- 发布时间:2024/1/15 14:17:00 -- --------------------------- --------------------------- System.Collections.Generic.List`1[System.String] --------------------------- 确定 --------------------------- 点击确定后报错
|
-- 作者:有点蓝 -- 发布时间:2024/1/15 14:33:00 -- 改了什么东西?重新贴出完整代码 |
-- 作者:yifan3429 -- 发布时间:2024/1/15 17:05:00 -- Dim wb As New weui Select Case e.Path Case "yanfacpdata" If e.PostValues.Count = 0 AndAlso e.Files.Keys.count = 0 Then \' wb.AddForm("", "form1", "yanfacpdata") With wb.AddInputGroup("form1", "ipg1", "增加员工") .AddUploader("up1", "照片", True) \'True表示允许上传多个文件 End With With wb.AddButtonGroup("form1", "btg1", True) .Add("btn1", "确定", "submit") End With \' MessageBox.show(1) e.WriteString(wb.Build) Else \' MessageBox.show(2) 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, "E:\\www\\JKMJ-layui\\pic\\cptp\\" & fln) MessageBox.show((e.Files(key)).ToString) Next End If Next \'保存并生成增加成功提示页面 With wb.AddMsgPage("", "msgpage", "增加成功", "好好学习,天天向上") \'生成成功提示页 .AddButton("btn1", "继续增加", "yanfacpdata") End With e.WriteString(wb.Build) End If End Select
|
-- 作者:有点蓝 -- 发布时间:2024/1/15 17:23:00 -- 这个代码我测试没有问题,应该是其它地方代码问题 [此贴子已经被作者于2024/1/15 17:23:26编辑过]
|