Пример #1
0
    protected void uxUpdateButton_Click(object sender, EventArgs e)
    {
        try
        {
            string message = string.Empty;
            if (!uxEmailSetup.Update(out message))
            {
                uxMessage.DisplayError(message);
                return;
            }

            uxDisplay.Update();
            uxStoreLayoutConfig.Update();
            uxStoreProfileConfig.Update();
            uxFacebook.Update();
            uxBlogConfig.Update();
            uxPointSystemConfig.Update();
            uxSeoConfig.Update();

            DataAccessContext.ClearConfigurationCache();
            AdminUtilities.LoadSystemConfig();

            uxMessage.DisplayMessage(Resources.SetupMessages.UpdateSuccess);
            PopulateControls();
            SystemConfig.Load();
        }
        catch (Exception ex)
        {
            uxMessage.DisplayException(ex);
        }
    }
Пример #2
0
        public static void ClearAdminCache()
        {
            DataAccessContext.ClearConfigurationCache();

            AdminMenuAdvancedAccessCache.ClearCache();
            AdminMenuPageAccessCache.ClearCache();
            AdminMenuPermissionAccessCache.ClearCache();
        }
    protected void Page_Init(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            // Clear configuration every time a page is loaded for Installation Wizard.
            // This is in case that the customer has changed the PaymentSettings.config.
            DataAccessContext.ClearConfigurationCache();

            if (DataAccessContext.ApplicationSettings.InstallCompleted)
            {
                Response.Redirect("../Default.aspx");
            }
        }
    }
Пример #4
0
    protected void uxExecuteButton_Click(object sender, EventArgs e)
    {
        try
        {
            if (uxExecuteText.Text != "")
            {
                AdminUtilities.RemoveAllCacheInMemory();

                DatabaseConverter databaseConverter = new DatabaseConverter();

                databaseConverter.OnScriptExecuting();
                DataAccess.ExecuteNonQueryNoParameter(uxExecuteText.Text.Trim());
                databaseConverter.OnScriptExecuted();

                // Update configurations
                DataAccessContext.ClearConfigurationCache();
                ConfigurationHelper.ApplyConfigurations();

                databaseConverter.Convert();

                AdminUtilities.RemoveAllCacheInMemory();

                // Set up PaymentModule
                //      PaymentModuleSetup paymentModule = new PaymentModuleSetup();
                //      paymentModule.ProcessDatabaseConnected();

                uxMessageLabel.ForeColor = System.Drawing.Color.Green;
                uxMessageLabel.Text      = "<strong>Upgrade Completed</storng>";
            }
            else
            {
                DisplatError("No command to execute.");
            }
        }
        catch (Exception ex)
        {
            DisplatError(ex.Message);
        }
    }