private void CreatePages(TemplateInfo templateInfo) { if (templateInfo.TemplateType == ETemplateType.FileTemplate) { CreateManager.CreateFile(PublishmentSystemId, templateInfo.TemplateId); } else if (templateInfo.TemplateType == ETemplateType.IndexPageTemplate) { if (templateInfo.IsDefault) { CreateManager.CreateIndex(PublishmentSystemId); } } }
public void Page_Load(object sender, EventArgs e) { if (IsForbidden) { return; } PageUtils.CheckRequestParameter("PublishmentSystemID"); if (!IsPostBack) { CreateManager.CreateIndex(PublishmentSystemId); PageCreateStatus.Redirect(PublishmentSystemId); } }
public void Page_Load(object sender, EventArgs e) { if (IsForbidden) { return; } PageUtils.CheckRequestParameter("PublishmentSystemID"); // 检测参数PublishmentSystemID是否合法(不能为空) if (!IsPostBack) { CreateManager.CreateIndex(PublishmentSystemId); // 创建任务 PageCreateStatus.Redirect(PublishmentSystemId); // 转到查询任务进度页面 } }
//生成首页 private void CreateIndex() { LtlTitle.Text = "生成首页"; var link = new HyperLink(); link.NavigateUrl = PageUtility.GetIndexPageUrl(PublishmentSystemInfo); link.Text = "浏览"; if (link.NavigateUrl != PageUtils.UnclickedUrl) { link.Target = "_blank"; } link.Style.Add("text-decoration", "underline"); try { CreateManager.CreateIndex(PublishmentSystemId); //FileSystemObject FSO = new FileSystemObject(base.PublishmentSystemID); //FSO.AddIndexToWaitingCreate(); LtlRegisterScripts.Text = @" <script> $(document).ready(function(){ writeResult('首页生成成功。', ''); }) </script> "; } catch (Exception ex) { LtlRegisterScripts.Text = $@" <script> $(document).ready(function(){{ writeResult('', '{ex.Message}'); }}) </script> "; } }