-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDefault.ascx.vb
executable file
·147 lines (92 loc) · 4.73 KB
/
Default.ascx.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
Imports System.Web.UI.WebControls
Imports DotNetNuke
Imports DotNetNuke.Common
Imports DotNetNuke.Common.Utilities
Imports DotNetNuke.Entities.Modules
Imports DotNetNuke.Entities.Modules.Actions
Imports DotNetNuke.Entities.Tabs
Imports DotNetNuke.Security
Imports DotNetNuke.Security.Roles
Imports DotNetNuke.Services.Localization
Namespace Ventrian.FeedbackCenter
Public MustInherit Class CDefault
Inherits PortalModuleBase
Implements IActionable
#Region " Controls "
Protected WithEvents phControls As System.Web.UI.WebControls.PlaceHolder
#End Region
#Region " Private Members "
Private _controlToLoad As String
#End Region
#Region " Private Methods "
Private Sub ReadQueryString()
If Not (Request("fbType") Is Nothing) Then
' Load the appropriate Control
'
Select Case Request("fbType").ToLower()
Case "approvecomments"
_controlToLoad = "ApproveComments.ascx"
Case "approvefeedback"
_controlToLoad = "ApproveFeedback.ascx"
Case "edit"
_controlToLoad = "EditFeedback.ascx"
Case "editcomplete"
_controlToLoad = "EditFeedbackComplete.ascx"
Case "myfeedback"
_controlToLoad = "MyFeedback.ascx"
Case "notauthorized"
_controlToLoad = "NotAuthorized.ascx"
Case "search"
_controlToLoad = "Search.ascx"
Case "tracking"
_controlToLoad = "Tracking.ascx"
Case "view"
_controlToLoad = "ViewFeedback.ascx"
Case Else
_controlToLoad = "LandingPage.ascx"
End Select
Else
_controlToLoad = "LandingPage.ascx"
End If
End Sub
Private Sub LoadControlType()
Dim objPortalModuleBase As PortalModuleBase = CType(Me.LoadControl(_controlToLoad), PortalModuleBase)
If Not (objPortalModuleBase Is Nothing) Then
objPortalModuleBase.ModuleConfiguration = Me.ModuleConfiguration
objPortalModuleBase.ID = System.IO.Path.GetFileNameWithoutExtension(_controlToLoad)
phControls.Controls.Add(objPortalModuleBase)
End If
End Sub
#End Region
#Region " Event Handlers "
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Page_Initialize(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
ReadQueryString()
LoadControlType()
End Sub
#End Region
#Region " Optional Interfaces "
Public ReadOnly Property ModuleActions() As DotNetNuke.Entities.Modules.Actions.ModuleActionCollection Implements IActionable.ModuleActions
Get
Dim Actions As New ModuleActionCollection
Actions.Add(GetNextActionID, Localization.GetString("EditCustomFields.Text", LocalResourceFile), ModuleActionType.ContentOptions, "", "", EditUrl("EditCustomFields"), False, SecurityAccessLevel.Edit, True, False)
Actions.Add(GetNextActionID, Localization.GetString("EditEmailFiles.Text", LocalResourceFile), ModuleActionType.ContentOptions, "", "", EditUrl("EditEmailFiles"), False, SecurityAccessLevel.Edit, True, False)
Actions.Add(GetNextActionID, Localization.GetString("EditLayoutFiles.Text", LocalResourceFile), ModuleActionType.ContentOptions, "", "", EditUrl("EditLayoutFiles"), False, SecurityAccessLevel.Edit, True, False)
Actions.Add(GetNextActionID, Localization.GetString("EditProducts.Text", LocalResourceFile), ModuleActionType.ContentOptions, "", "", EditUrl("EditProducts"), False, SecurityAccessLevel.Edit, True, False)
Return Actions
End Get
End Property
#End Region
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
End Sub
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
End Class
End Namespace