-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathViewCart.ashx.vb
executable file
·72 lines (42 loc) · 1.7 KB
/
ViewCart.ashx.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Imports System.Web
Imports System.Web.Services
Imports DotNetNuke.Common.Utilities
Imports Ventrian.SimpleGallery.Entities
Namespace Ventrian.SimpleGallery
Public Class ViewCart
Implements System.Web.IHttpHandler
#Region " Private Members "
Private _moduleID As Integer = Null.NullInteger
#End Region
#Region " Properties "
ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
Get
Return False
End Get
End Property
#End Region
#Region " Private Methods "
Private Sub ReadQueryString(ByVal context As HttpContext)
If (context.Request("mid") <> "") Then
If (IsNumeric(context.Request("mid"))) Then
_moduleID = Convert.ToInt32(context.Request("mid"))
End If
End If
End Sub
#End Region
#Region " Event Handlers "
Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
context.Response.ContentType = "text/html"
ReadQueryString(context)
If (_moduleID <> Null.NullInteger) Then
Dim objTemplateController As New TemplateController()
Dim objTemplate As TemplateInfo = objTemplateController.Get(_moduleID, TemplateType.ViewCart.ToString())
If (objTemplate IsNot Nothing) Then
Dim html As String = "<html><head></head><body>" & objTemplate.Template & "</body></html>"
context.Response.Write(html)
End If
End If
End Sub
#End Region
End Class
End Namespace