-
Notifications
You must be signed in to change notification settings - Fork 11
/
DeleteComment.ascx.vb
executable file
·50 lines (31 loc) · 1.39 KB
/
DeleteComment.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
Imports DotNetNuke.Services.Exceptions
Imports DotNetNuke.Services.Localization
Namespace Ventrian.PropertyAgent
Partial Public Class DeleteComment
Inherits PropertyAgentControl
#Region " Private Properties "
Private ReadOnly Property ResourceFile() As String
Get
Return "~/DesktopModules/PropertyAgent/App_LocalResources/DeleteComment"
End Get
End Property
#End Region
#Region " Event Handlers "
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If (Page.IsPostBack = False) Then
cmdDelete.Attributes.Add("onClick", "javascript:return confirm('" & Localization.GetString("Confirmation", ResourceFile) & "');")
cmdDelete.CssClass = PropertySettings.ButtonClass
End If
End Sub
Protected Sub cmdDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdDelete.Click
Try
Dim objCommentController As New CommentController
objCommentController.Delete(CurrentComment.CommentID)
Response.Redirect(Request.RawUrl, True)
Catch exc As Exception
ProcessModuleLoadException(Me, exc)
End Try
End Sub
#End Region
End Class
End Namespace