protected void btnCreateMap_Click(object sender, EventArgs e)
        {
            try
            {
                MsgErr(true);

                // Directory
                if (!Directory.Exists(_strPhysicalTargetFolder))
                {
                    Directory.CreateDirectory(_strPhysicalTargetFolder);
                }

                // Old files
                if (File.Exists(_strPhysicalTargetFolder))
                {
                    File.Delete(_strPhysicalTargetFolder);
                }

                // Save new file
                //SiteMapService.GenerateSiteMap(_strPhysicalFilePath, StrInitFileVirtualPath);

                var temp = new ExportXmlMap(_strPhysicalFilePath, strInitFileVirtualPath);
                temp.Create();

                // Refresh label info
                RefreshFileDateInfo();
            }
            catch (Exception ex)
            {
                MsgErr(ex.Message + " at btnCreateMap_Click");
                AdvantShop.Diagnostics.Debug.LogError(ex);
            }
        }
Exemple #2
0
        public void Execute(IJobExecutionContext context)
        {
            if (Trial.IsTrialEnabled)
            {
                return;
            }

            string strFileName             = "sitemap.xml".ToLower();
            string strPhysicalTargetFolder = SettingsGeneral.AbsolutePath;
            string strPhysicalFilePath     = strPhysicalTargetFolder + strFileName;
            var    temp = new ExportXmlMap(strPhysicalFilePath, strPhysicalTargetFolder);

            temp.Create();
        }