Imports BVSoftware.BVC.Core Public Class Products_Reviews_Edit Inherits BaseAdminPage #Region " Web Form Designer Generated Code " 'This call is required by the Web Form Designer. Private Sub InitializeComponent() End Sub Protected WithEvents MetaDescriptionControl As BVSoftware.WebControls.MetaTag Protected WithEvents MetaKeywordsControl As BVSoftware.WebControls.MetaTag 'NOTE: The following placeholder declaration is required by the Web Form Designer. 'Do not delete or move it. Private designerPlaceholderDeclaration As System.Object 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 Protected WithEvents ProductReviewEditor1 As ProductReviewEditor Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load BVC2004Store.CheckThisPage(Security.RolePermission.LoginToAdmin) BVC2004Store.CheckThisPage(Security.RolePermission.AccessProductArea) If Not Page.IsPostBack Then MetaKeywordsControl.Content = WebAppSettings.MetaKeywords MetaDescriptionControl.Content = WebAppSettings.MetaDescription If Not Request.Params("ReturnURL") Is Nothing Then ViewState("ReturnURL") = Request.Params("ReturnURL") End If If Not Request.Params("ReviewID") Is Nothing Then Dim rid As Integer = 0 rid = Request.Params("ReviewID") ProductReviewEditor1.ReviewID = rid ProductReviewEditor1.LoadReview() End If End If End Sub Private Sub ProductReviewEditor1_EditCanceled(ByVal sender As Object, ByVal e As System.EventArgs) Handles ProductReviewEditor1.EditCanceled If Request.Params("DOC") = 1 Then CatalogServices.ProductReviews.Delete(Request.Params("ReviewID")) End If If Not ViewState("ReturnURL") Is Nothing Then Response.Redirect(ViewState("ReturnURL")) Else Response.Redirect("Products_ReviewsToModerate.aspx") End If End Sub Private Sub ProductReviewEditor1_EditOK(ByVal sender As Object, ByVal e As System.EventArgs) Handles ProductReviewEditor1.EditOK If Not ViewState("ReturnURL") Is Nothing Then Response.Redirect(ViewState("ReturnURL")) Else Response.Redirect("Products_ReviewsToModerate.aspx") End If End Sub End Class