页面代码如下:
红色部分代码没有起作用…页面永远只显示下划线部分的内容…麻烦老师帮忙看看!
Dim e As RequestEventArgs = args(0)
Dim wb As New weui
Dim xingming As String = e.PostValues("待办人")
Dim shixiangming As String = e.PostValues("事项名称")
Dim vals As String
Dim cmd11 As New SQLCommand
cmd11.Connectio nName = "智慧党建" '记得设置数据源名称
cmd11.CommandText = "Sel ect * From {待办事项}"
Dim dt As DataTable = cmd11.ExecuteReader
If e.PostValues.Count = 0 Then
wb.AddPageTitle("","ph1","事项管理","【事项完成时,待办人无名单;请选择名单后进行对应操作!】")
wb.AddForm("","form1","smrenwu.htm")
Dim dr As DataRow= dt.S QLFind("[事项名称]='" & shixiangming & "'and [待办人]='" & xingming & "'and [完成情况]='未完成'")
If dr IsNot Nothing Then 当记录不是空值时 也就是找到行时 显示可以上传的页面 反之就显示不能上传的页面 同时提醒tst4的内容
With wb.AddInputGroup("form1","ipg1","基础信息")
.AddInput("待办人","待办人","text").Value = e.GetValues("a")
.AddInput("事项名称","事项名称","text").Value = e.GetValues("b")
End With
wb.AddTopTips("","toptip1","请选择待办人和事项名称!")
With wb.AddInputGroup("form1","ipg2","文件上传") '文件上传
With.AddUploader("up1","请点击+号选择需要上传的文件",True) 'True表示允许上传多个文件
.AllowDelete = True '允许删除
.Incremental = True '允许重复选择文件或连续拍照
.ScaleWidth = 1024
End With
Dim sb As New StringBuilder
sb.appendLine("<div>")
sb.appendLine("单文件上传: <input type='file' name='up1' id='up1'><br/>")
sb.appendLine("多文件上传: <input type='file' name='up2' id='up2' multiple>")
sb.appendLine("</div>")
wb.InsertHTML("form1",sb.ToString)
End With
With wb.AddButtonGroup("form1","btg1",False)
.Add("btn1", "确定上传", "button").Attr ibute= "onc lick='smrwsubmitForm()'" '调用js函数上传
.Add("btn2", "取消上传", "submit").FormA ction = "default1.htm"
End With
wb.AddToast("","tst1", "正在上传",1)
wb.AddToast("","tst2", "上传成功",0)
wb.AddToast("","tst3", "上传失败",0).Icon= "warn"
wb.AddToast("","tst4", "你已经上传过,请勿重复上传!",0).Icon= "warn"
wb.InsertHTML("<script>" & vars("ajaxform") & "</script>")'引入脚本文件
Else
With wb.AddInputGroup("form1","ipg1","基础信息")
.AddInput("待办人","待办人","text").Value = e.GetValues("a")
.AddInput("事项名称","事项名称","text").Value = e.GetValues("b")
.AddInput("完成情况","完成情况","text").Value = “已完成请勿重复操作!”
End With
End If
e.WriteString(wb.Build)
Else
Dim st As New Date(1970,1,1,8,0,0)
Dim d As Date = cdate("2020-02-01")
Dim t As Long = (Date.Now - st).TotalSeconds()
Dim dr As DataRow= dt.SQLF ind("[事项名称]='" & shixiangming & "'and [待办人]='" & xingming & "'and [完成情况]='未完成'")
Dim cmd111 As New SQ LCommand
cmd111.Connectio nName = "智慧党建"
Dim sql As String ="UPDA TE 待办事项 SET 完成情况='已完成' WHERE 事项名称=? and 待办人=? and uuid=? "
cmd111.CommandText = sql
cmd111.Parameters.Add("@事项名称", e.PostValues("事项名称"))
cmd111.Parameters.Add("@待办人", e.PostValues("待办人"))
cmd111.Parameters.Add("@uuid", dr("uuid"))
cmd111.ExecuteNonQuery
e.WriteString("OK")
End If