Beispiel #1
0
    /// <summary>
    /// Creates the installation package and if successful moves the control to step two
    /// </summary>
    /// <param name="fullFilePath">Full physical path to the resulting package file.</param>
    private void MoveToNextStep(string fullFilePath)
    {
        try
        {
            mPackageBuilder.BuildPackage(fullFilePath);
        }
        catch (Exception ex)
        {
            ShowError("cms.modules.installpackage.failed");
            EventLogProvider.LogException("CreateInstallPackage", "BuildPackage", ex);

            return;
        }

        FooterControl.Visible = false;
        plcStep1.Visible      = false;
        plcStep2.Visible      = true;

        string linkString       = null;
        string unmappedFilePath = URLHelper.UnMapPath(fullFilePath);

        if (!unmappedFilePath.EqualsCSafe(fullFilePath))
        {
            linkString = String.Format("<a href=\"{0}\">{1}</a>", HTMLHelper.EncodeForHtmlAttribute(UrlResolver.ResolveUrl(unmappedFilePath)), HTMLHelper.HTMLEncode(fullFilePath));
        }
        ltlExportResult.Text = String.Format(GetString("cms.modules.installpackage.result"), linkString ?? fullFilePath);
    }