Dim e As RequestEventArgs = args(0)
Sele ct Case e.Path
Case "rz.htm"
Dim wb As New WeUI
wb.AddToast("","t1", "正在下载",1) '定义提示
wb.AddForm("","form1","rz.htm")
With wb.AddInputGroup("form1","ipg1","日期输入")
.AddInput("nl","日期选择","date").Value = Date.Today.AddDays(-1)
End With
With wb.AddButtonGroup("form1","btg1",False)
.Add("btn4", "查询","button")
.Add("btn5", "excel下载", "", "http://127.0.0.1/rzxiazai.htm").attrib ute= "on click=""s how('t1',5000)"""
End With
With wb.AddTable("","Table1")
.CreateFromDataTable(DataTables("汇总"),True)
End With
wb.Append HTML("<script src='./lib/ribcx.j s'></script>")
e.Write String(wb.Build)
Case "rzxiazai.htm"
Dim fl As String = ProjectPath & "Reports\汇总" & DataTables("汇总").DataRows(0)("日期") & ".xls"
Functi ons.Execute("excel生成") '处理生成excel + 调整为自动行高
Dim Book As New XLS.Book(fl)
book.PreBuild = False
e.WriteBook(book,"汇总",False)
End Sele ct
在httprequest执行
Functions.Execute("汇总",e)
但是出来的界面,点击下载后,发现httprequest中Functions.Execute("汇总",e)执行了2次,excel生成和调整行高速度慢,处理2次更慢了,这个地方是怎么会执行2次了呢?