예제 #1
0
    protected void EditButton_Click(object sender, EventArgs e)
    {
        if (!Page.IsValid)
        {
            return;
        }

        try
        {
            StoreConfiguration.UpdateValue(ConfigurationKey.StoreName, StoreName.Text);
            StoreConfiguration.UpdateValue(ConfigurationKey.StoreURL, StoreURL.Text);
            StoreConfiguration.UpdateValue(ConfigurationKey.SalesTeamEmail, SalesTeamEmail.Text);
            StoreConfiguration.UpdateValue(ConfigurationKey.NewOrdersEmail, NewOrdersEmail.Text);
            StoreConfiguration.UpdateValue(ConfigurationKey.ContactEmail, ContactEmail.Text);
            StoreConfiguration.UpdateValue(ConfigurationKey.PayPalAPIUsername, PayPalAPIUsername.Text);
            StoreConfiguration.UpdateValue(ConfigurationKey.PayPalAPIPassword, PayPalAPIPassword.Text);
            StoreConfiguration.UpdateValue(ConfigurationKey.PayPalAPISignature, PayPalAPISignature.Text);
            StoreConfiguration.UpdateValue(ConfigurationKey.GoogleCheckoutEnabled, GoogleCheckoutEnabled.Checked.ToString().ToLower());
            StoreConfiguration.UpdateValue(ConfigurationKey.GoogleMerchantID, GoogleMerchantID.Text);
            StoreConfiguration.UpdateValue(ConfigurationKey.GoogleMerchantkey, GoogleMerchantkey.Text);
            StoreConfiguration.UpdateValue(ConfigurationKey.GoogleImageButtonURL, GoogleImageButtonURL.Text);
            StoreConfiguration.UpdateValue(ConfigurationKey.GoogleCheckoutURL, GoogleCheckoutURL.Text);
            StoreConfiguration.UpdateValue(ConfigurationKey.AuthorizeNetTestMode, AuthorizeNetTestMode.Checked.ToString().ToLower());
            StoreConfiguration.UpdateValue(ConfigurationKey.AuthorizeNetAPILoginID, AuthorizeNetAPILoginID.Text);
            StoreConfiguration.UpdateValue(ConfigurationKey.AuthorizeNetTransactionKey, AuthorizeNetTransactionKey.Text);

            StoreConfigurations.SaveAll();
            ErrorLiteral.Text = "Configuration Saved";
        }
        catch (Exception ex)
        {
            ErrorLiteral.Text = "ERROR Saving configuration: " + ex.Message;
        }
    }
예제 #2
0
    public void SetBasicConfiguration()
    {
        StoreConfiguration.UpdateValue(ConfigurationKey.StoreName, ((TextBox)CreateUserWizard1.WizardSteps[1].Controls[0].FindControl("StoreName")).Text);
        StoreConfiguration.UpdateValue(ConfigurationKey.StoreURL, ((TextBox)CreateUserWizard1.WizardSteps[1].Controls[0].FindControl("StoreURL")).Text);
        StoreConfiguration.UpdateValue(ConfigurationKey.SalesTeamEmail, ((TextBox)CreateUserWizard1.WizardSteps[1].Controls[0].FindControl("SalesTeamEmail")).Text);
        StoreConfiguration.UpdateValue(ConfigurationKey.NewOrdersEmail, ((TextBox)CreateUserWizard1.WizardSteps[1].Controls[0].FindControl("NewOrdersEmail")).Text);
        StoreConfiguration.UpdateValue(ConfigurationKey.ContactEmail, ((TextBox)CreateUserWizard1.WizardSteps[1].Controls[0].FindControl("ContactEmail")).Text);

        StoreConfigurations.SaveAll();
    }
예제 #3
0
    public void SetPaymentConfiguration()
    {
        StoreConfiguration.UpdateValue(ConfigurationKey.PayPalAPIUsername, ((TextBox)CreateUserWizard1.WizardSteps[2].Controls[0].FindControl("PayPalAPIUsername")).Text);
        StoreConfiguration.UpdateValue(ConfigurationKey.PayPalAPIPassword, ((TextBox)CreateUserWizard1.WizardSteps[2].Controls[0].FindControl("PayPalAPIPassword")).Text);
        StoreConfiguration.UpdateValue(ConfigurationKey.PayPalAPISignature, ((TextBox)CreateUserWizard1.WizardSteps[2].Controls[0].FindControl("PayPalAPISignature")).Text);
        StoreConfiguration.UpdateValue(ConfigurationKey.GoogleCheckoutEnabled, ((CheckBox)CreateUserWizard1.WizardSteps[2].Controls[0].FindControl("GoogleCheckoutEnabled")).Checked.ToString().ToLower());
        StoreConfiguration.UpdateValue(ConfigurationKey.GoogleMerchantID, ((TextBox)CreateUserWizard1.WizardSteps[2].Controls[0].FindControl("GoogleMerchantID")).Text);
        StoreConfiguration.UpdateValue(ConfigurationKey.GoogleMerchantkey, ((TextBox)CreateUserWizard1.WizardSteps[2].Controls[0].FindControl("GoogleMerchantkey")).Text);
        StoreConfiguration.UpdateValue(ConfigurationKey.GoogleImageButtonURL, ((TextBox)CreateUserWizard1.WizardSteps[2].Controls[0].FindControl("GoogleImageButtonURL")).Text);
        StoreConfiguration.UpdateValue(ConfigurationKey.AuthorizeNetTestMode, ((CheckBox)CreateUserWizard1.WizardSteps[2].Controls[0].FindControl("AuthorizeNetTestMode")).Checked.ToString().ToLower());
        StoreConfiguration.UpdateValue(ConfigurationKey.AuthorizeNetAPILoginID, ((TextBox)CreateUserWizard1.WizardSteps[2].Controls[0].FindControl("AuthorizeNetAPILoginID")).Text);
        StoreConfiguration.UpdateValue(ConfigurationKey.AuthorizeNetTransactionKey, ((TextBox)CreateUserWizard1.WizardSteps[2].Controls[0].FindControl("AuthorizeNetTransactionKey")).Text);

        StoreConfigurations.SaveAll();
    }
예제 #4
0
 protected void ContinueButton_Click(object sender, EventArgs e)
 {
     StoreConfiguration.UpdateValue(ConfigurationKey.SetupRan, "true");
     StoreConfigurations.UpdateConfigurationValue(ConfigurationKey.SetupRan, "true");
     Response.Redirect("../admin");
 }