Imports BVSoftware.BVC.Core Public Class configuration_privacy_edit Inherits BaseAdminPage Protected WithEvents inName As System.Web.UI.WebControls.TextBox Protected WithEvents btnCancel As System.Web.UI.WebControls.ImageButton Protected WithEvents btnSave As System.Web.UI.WebControls.ImageButton Protected WithEvents FirstFocus1 As MetaBuilders.WebControls.FirstFocus Protected WithEvents DefaultButtons1 As MetaBuilders.WebControls.DefaultButtons Protected WithEvents MetaDescriptionControl As BVSoftware.WebControls.MetaTag Protected WithEvents MetaKeywordsControl As BVSoftware.WebControls.MetaTag Protected WithEvents DescriptionField As System.Web.UI.WebControls.TextBox Protected WithEvents msg As BVSoftware.WebControls.WebPageMessage Protected WithEvents inEditID As System.Web.UI.WebControls.TextBox #Region " Web Form Designer Generated Code " 'This call is required by the Web Form Designer. 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 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.AccessContentArea) If Not Page.IsPostBack Then MetaKeywordsControl.Content = WebAppSettings.MetaKeywords MetaDescriptionControl.Content = WebAppSettings.MetaDescription End If If Not Page.IsPostBack() Then Dim sEditID As String sEditID = Request.Params("id") If sEditID = Nothing Then Page.SmartNavigation = False Response.Redirect("content_privacy.aspx") Else Dim PolData As New DataTable PolData = ContentServices.Policies.GetByID(sEditID) If PolData.Rows.Count > 0 Then inEditID.Text = sEditID inName.Text = PolData.Rows(0).Item("Name") DescriptionField.Text = PolData.Rows(0).Item("description") Else Page.SmartNavigation = False Response.Redirect("content_privacy.aspx") End If End If End If End Sub Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnCancel.Click Response.Redirect("content_privacy.aspx", True) End Sub Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnSave.Click msg.Clear() If ContentServices.Policies.Update(inEditID.Text, inName.Text, DescriptionField.Text) = True Then Response.Redirect("content_privacy.aspx", True) Else msg.ShowError("Error While Saving Section") End If End Sub End Class