'更新
If UW.WU.IsNonEmptyFromQueryStringOrForm("Refresh") Then
System.Web.HttpContext.Current.Cache.Remove(CacheName)
End If
'快取部分
If obj Is Nothing Then
Dim SQL As String = ""
SQL = "select * from Product with (nolock)"
obj = UW.SQL.DTFromSQL(SQL)
Dim AC As New AggregateCacheDependency
Dim DepArray() As CacheDependency = { _
New SqlCacheDependency(UW.SQL.sqlCacheDependencyName, "Product"), _
New SqlCacheDependency(UW.SQL.sqlCacheDependencyName, "Product_Category") _
}
AC.Add(DepArray)
Dim FD As New CacheDependency(UW.Template.TemplateRoot & "2013UI\Product\DirectBuyAllProduct.html")
AC.Add(FD)
System.Web.HttpContext.Current.Cache.Insert(CacheName, obj, AC)
End If
StartP = StartP + StartKey.Length
Dim EndP As String = Source.IndexOf(EndKey, StringComparison.OrdinalIgnoreCase)
' 應該修改為以下寫法 =>
StartP = StartP + StartKey.Length
Dim EndP As String = Source.IndexOf(EndKey, StartP, StringComparison.OrdinalIgnoreCase)
0.0005085 No StartP
0.0002082 with StartP
0.0000157 StringComparison.Ordinal with StartP
0.0002768 StringComparison.OrdinalIgnoreCase, No StartP
0.0001105 StringComparison.OrdinalIgnoreCase with StartP
0.0002116 StringComparison.CurrentCulture with StartP
0.0002085 StringComparison.CurrentCultureIgnoreCase with StartP
Inherits Master
Protected Sub Page_PreLoad(sender As Object, e As EventArgs) Handles Me.PreLoad
End Sub
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
HandleAction()
End Sub
Sub HandleAction()
If UW.WU.IsNonEmptyFromQueryStringOrForm("Action") Then
Dim Action As String = UW.WU.GetValueFromQueryStringOrForm("Action")
Select Case Action
End Select
End If
End Sub
Protected Sub Page_PreRender(sender As Object, e As EventArgs) Handles Me.PreRender
LoadPageContext()
End Sub
Sub LoadPageContext()
End Sub
Sub JSONWriteToClient(ByVal TrueorFalse As Boolean, Optional ByVal msg As String = "", Optional ByVal Title As String = "", Optional ByVal Content As String = "", Optional ByVal Content2 As String = "", Optional ByVal Content3 As String = "")
Dim TF As String = Now.ToString("yyyyMMddHHmmss")
Dim oJ As UW.JSON
oJ = New UW.JSON(TrueorFalse, msg)
oJ.add("Title", Title)
oJ.add("Content", Content)
oJ.add("Content2", Content2)
oJ.add("Content3", Content3)
oJ.add("TF", TF)
oJ.WriteToClient()
Response.End()
End Sub
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!--Header S-->
<!--<title>{Title}</title>
<meta name="description" content="{Description}" />
<script type="text/javascript" src="{UNTJS}"></script>-->
<!--AutoScripts S--><!--AutoScripts E-->
<!--AutoCSS S--><!-- AutoCSS E-->
<!--Header E-->
</head>
<body>
<!--Content S-->
<!--FinalScript S-->
<script type="text/javascript">
$(document).ready(function () {
})
</script>
<!--FinalScript E-->
<!--Content E-->
</body>
</html>
Protected Sub Page_PreLoad(sender As Object, e As EventArgs) Handles Me.PreLoad
SHOPUNT.GN.WSC.CheckLogin() '檢查是否有登入、否則導回Login
SHOPUNT.GN.WSC.CheckRightOrStop(SHOPUNT.EN.AuthCode.廣告管理) '檢查是否有廣告編輯的權限
End Sub
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
HandleAction()
End Sub
Sub HandleAction()
If UW.WU.IsNonEmptyFromQueryStringOrForm("Action") Then
Dim Action As String = UW.WU.GetValueFromQueryStringOrForm("Action")
Select Case Action
End Select
End If
End Sub
Protected Sub Page_PreRender(sender As Object, e As EventArgs) Handles Me.PreRender
'Me.Master.strTitle = "目錄管理"
'Me.Master.IsListItemScript = True
LoadPageContext()
End Sub
Sub LoadPageContext()
End Sub
For I As Int32 = 1 To DT.Rows.Count
If order_num_right = DT.Rows(I - 1)("Pid") Then
Pid_No = I - 1
End If
#OFCL.Pid = DT.Rows(I - 1)("Pid")
#OFCL.GetDataRowAndReturnSelfOrNothing()
Dim NewT As String = oT.Result
NewT = NewT.Replace("#Y#", StartY + (I - 1) * LH)
NewT = NewT.Replace("#序號#", I.ToString)
NewT = NewT.Replace("#品號#", OFCL.Pid)
NewT = NewT.Replace("#品名#", OFCL.Product_Name)
NewT = NewT.Replace("#包裝#", OFCL.Package)
NewT = NewT.Replace("#單位#", OFCL.UNIT)
NewT = NewT.Replace("#數量#", OFCL.Qty)
NewT = NewT.Replace("#箱數#", OFCL.BOX)
NewT = NewT.Replace("#總數量#", OFCL.Total)
NewT = NewT.Replace("#未稅價#", OFCL.Price)
NewT = NewT.Replace("#總金額#", OFCL.Sum)
Res &= NewT
Next