Imports BVSoftware.BVC.Core Public Class configuration_shipping_rules Inherits BaseAdminPage Protected WithEvents lblError As System.Web.UI.WebControls.Label Protected WithEvents btnUPSLicense As System.Web.UI.WebControls.ImageButton Protected WithEvents btnUPSRegister As System.Web.UI.WebControls.ImageButton Protected WithEvents UPSLicense As System.Web.UI.WebControls.TextBox Protected WithEvents lblUPSLicense As System.Web.UI.WebControls.Label Protected WithEvents UPSUsername As System.Web.UI.WebControls.TextBox Protected WithEvents lblUPSUsername As System.Web.UI.WebControls.Label Protected WithEvents UPSPassword As System.Web.UI.WebControls.TextBox Protected WithEvents lblUPSPassword As System.Web.UI.WebControls.Label Protected WithEvents USPSUsername As System.Web.UI.WebControls.TextBox Protected WithEvents USPSPassword As System.Web.UI.WebControls.TextBox Protected WithEvents USPSServer As System.Web.UI.WebControls.TextBox Protected WithEvents inURL_USPS As System.Web.UI.WebControls.TextBox Protected WithEvents inURL_UPS As System.Web.UI.WebControls.TextBox Protected WithEvents inURL_FedEx As System.Web.UI.WebControls.TextBox Protected WithEvents btnCancel As System.Web.UI.WebControls.ImageButton Protected WithEvents lblResponse As System.Web.UI.WebControls.Label Protected WithEvents MetaDescriptionControl As BVSoftware.WebControls.MetaTag Protected WithEvents MetaKeywordsControl As BVSoftware.WebControls.MetaTag Protected WithEvents btnSave As System.Web.UI.WebControls.ImageButton #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.AccessSettingsArea) If Not Page.IsPostBack Then MetaKeywordsControl.Content = WebAppSettings.MetaKeywords MetaDescriptionControl.Content = WebAppSettings.MetaDescription End If If Not Page.IsPostBack Then Try inURL_USPS.Text = WebAppSettings.ShipURLUSPS inURL_UPS.Text = WebAppSettings.ShipURLUPS inURL_FedEx.Text = WebAppSettings.ShipURLFedEx USPSUsername.Text = WebAppSettings.ShippingUSPostalUsername USPSPassword.Text = WebAppSettings.ShippingUSPostalPassword USPSServer.Text = WebAppSettings.ShippingUSPostalServer UPSUsername.Text = WebAppSettings.ShippingUPSUsername UPSPassword.Text = WebAppSettings.ShippingUPSPassword lblUPSUsername.Text = "Please Register For a UPS Account" lblUPSPassword.Text = "Please Register For a UPS Account" If UPSUsername.Text.Length() < 1 Or UPSPassword.Text.Length() < 1 Then UPSUsername.Visible = False UPSPassword.Visible = False lblUPSUsername.Visible = True lblUPSPassword.Visible = True Else UPSUsername.Visible = True UPSPassword.Visible = True lblUPSUsername.Visible = False lblUPSPassword.Visible = False End If UPSLicense.Text = WebAppSettings.ShippingUPSLicense If UPSLicense.Text.Length() < 1 Then btnUPSRegister.Visible = False End If If UPSLicense.Text.Length < 1 Then lblUPSLicense.Text = "Please Apply for a License with UPS" UPSLicense.Visible = False lblUPSLicense.Visible = True Else lblUPSLicense.Text = UPSLicense.Text UPSLicense.Visible = False lblUPSLicense.Visible = True End If Catch Ex As Exception lblError.Text = Ex.Message & " " & Ex.Source End Try End If End Sub Sub btnUPSRegister_OnClick(ByVal Sender As Object, ByVal E As ImageClickEventArgs) Response.Redirect("Configuration_Shipping_UPS_Register.aspx", True) End Sub Sub btnUPSLicense_OnClick(ByVal Sender As Object, ByVal E As ImageClickEventArgs) Response.Redirect("Configuration_Shipping_UPS_License.aspx", True) End Sub Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnCancel.Click Response.Redirect("Admindefault.aspx") End Sub Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnSave.Click lblError.Text = "" lblResponse.Text = "" Try WebAppSettings.ShipURLUSPS = inURL_USPS.Text WebAppSettings.ShipURLUPS = inURL_UPS.Text WebAppSettings.ShipURLFedEx = inURL_FedEx.Text WebAppSettings.ShippingUSPostalUsername = USPSUsername.Text WebAppSettings.ShippingUSPostalPassword = USPSPassword.Text WebAppSettings.ShippingUSPostalServer = USPSServer.Text WebAppSettings.ShippingUPSUsername = UPSUsername.Text WebAppSettings.ShippingUPSPassword = UPSPassword.Text WebAppSettings.ShippingUPSLicense = UPSLicense.Text lblResponse.Text = "Changes Saved" Catch Ex As Exception lblError.Text = Ex.Message & Ex.Source End Try End Sub End Class