Esempio n. 1
0
    /// <summary>
    /// Promotes a revision to the current live content.
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    private void PromoteVersion(object sender, EventArgs e)
    {
        var link = (LinkButton)sender;

        Content        c      = new Content();
        IContentEntity entity = c.GetContentEntity(_contentID);

        entity.CurrentRevision = new Guid(link.ID);
        c.SaveEntity(entity);

        Response.Redirect(Request.RawUrl);
    }
Esempio n. 2
0
    /// <summary>
    /// Saves an entry for this piece of content.
    /// </summary>
    private void SaveNewContent()
    {
        IContentEntity   e = new ContentEntity();
        IContentRevision r = new ContentRevision();

        FillEntity(e);
        FillRevision(e, r);

        var rows = new List <ContentRow>();

        FillContentRows(r, rows);

        _content.SaveEntity(e);
        _content.SaveRevision(r);
        _content.SaveRows(r, rows);

        Response.Redirect("/admin/content.aspx");
    }