'更新
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
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
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
Windows 2008 的 SMTP 寄信時若遇到 "Helo command rejected: need fully-qualified hostname" ,可做以下的修改。
The fix is easy:
DT.Select("Id=" & ProductId)
'寫入Cache前先設定好
DT.PrimaryKey = New DataColumn() {obj.Columns("Id")}
Dim row As DataRow = DT.Rows.Find(ProductId)
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
<providerOption name="CompilerVersion" value="v4.0"/>
<providerOption name="WarnAsError" value="false"/>
</compiler>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
<providerOption name="CompilerVersion" value="v4.0"/>
<providerOption name="OptionInfer" value="true"/>
<providerOption name="WarnAsError" value="false"/>
</compiler>
</compilers>
</system.codedom>