-
Notifications
You must be signed in to change notification settings - Fork 0
/
EditEmailFiles.ascx.vb
executable file
·86 lines (52 loc) · 2.6 KB
/
EditEmailFiles.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
Imports Ventrian.FeedbackCenter.Entities.Layout
Imports DotNetNuke.Common
Imports DotNetNuke.Services.Exceptions
Imports DotNetNuke.Services.Localization
Imports Ventrian.FeedbackCenter.Entities.Emails
Namespace Ventrian.FeedbackCenter
Partial Public Class EditEmailFiles
Inherits FeedbackCenterBase
#Region " Private Methods "
Private Sub BindEmailTypes()
For Each value As Integer In System.Enum.GetValues(GetType(EmailType))
Dim li As New ListItem
li.Value = System.Enum.GetName(GetType(EmailType), value)
li.Text = System.Enum.GetName(GetType(EmailType), value)
drpTemplate.Items.Add(li)
Next
End Sub
Private Sub BindTemplate()
Dim objEmailController As New EmailController()
Dim objLayout As EmailInfo = objEmailController.GetLayout(System.Enum.Parse(GetType(EmailType), drpTemplate.SelectedValue), ModuleId, Settings)
Dim layoutType As EmailType = System.Enum.Parse(GetType(EmailType), drpTemplate.SelectedValue)
txtTemplate.Text = objLayout.Template
rptTokens.DataSource = System.Enum.GetValues(GetType(EmailTokensType))
rptTokens.DataBind()
rptTokens.Visible = True
End Sub
#End Region
#Region " Event Handlers "
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If (IsPostBack = False) Then
BindEmailTypes()
BindTemplate()
End If
End Sub
Private Sub drpTemplate_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles drpTemplate.SelectedIndexChanged
Try
BindTemplate()
Catch exc As Exception 'Module failed to load
ProcessModuleLoadException(Me, exc)
End Try
End Sub
Private Sub cmdUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdUpdate.Click
Dim objEmailController As New EmailController()
objEmailController.UpdateLayout(System.Enum.Parse(GetType(EmailType), drpTemplate.SelectedValue), ModuleId, txtTemplate.Text)
lblTemplateUpdated.Visible = True
End Sub
Private Sub cmdCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCancel.Click
Response.Redirect(NavigateURL(TabId), True)
End Sub
#End Region
End Class
End Namespace