Exemplo n.º 1
0
    protected void Timer1_Tick(object sender, EventArgs e)
    {
        if (!string.IsNullOrEmpty(ChapterId) && IsEditorChanged)
        {
            XHTMLText formattedHTML = new XHTMLText();

            string content = formattedHTML.FormatXHTML(txtEditor.Content);

            SaveDraft(ChapterId, content);
            DisplayUpdateMessage("Last saved at : " + DateTime.Now.ToLongTimeString());
            lstChangedChaps.Items.Add(ChapterId);
        }
    }
Exemplo n.º 2
0
    protected void btnSaveContent_Click(object sender, EventArgs e)
    {
        //create a new version for chapter

        //add content to the chapter
        //SaveContent(ChapterId, "button");
        if (!string.IsNullOrEmpty(ChapterId))
        {
            XHTMLText formattedHTML = new XHTMLText();

            string content = formattedHTML.FormatXHTML(txtEditor.Content);

            SaveDraft(ChapterId, content);

            DisplayUpdateMessage("Last saved at : " + DateTime.Now.ToLongTimeString());
            IsEditorChanged = false;
            //IsNameChanged = false;
            lstChangedChaps.Items.Add(ChapterId);
            //Bind the new version to the TOC
            BindSequence();
            //load the saved chapter.
            LoadChapter(false);
        }
    }