示例#1
0
    public string NewBlog(string Title, string Body)
    {
        member = (Member)Session["Member"];

        blog = new BlogEntry();

        blog.MemberID       = member.MemberID;
        blog.Title          = Title;
        blog.Body           = HTMLUtility.FormatForHTML(Body);
        blog.DTCreated      = DateTime.Now;
        blog.WebBlogEntryID = Next2Friends.Misc.UniqueID.NewWebID();

        blog.Save();

        return(blog.WebBlogEntryID);
    }
示例#2
0
    public string UpdateBlog(string WebBlogId, string Title, string Body)
    {
        member = (Member)Session["Member"];
        blog   = BlogEntry.GetBlogEntryByWebBlogEntryID(WebBlogId);

        if (blog.MemberID != member.MemberID)
        {
            return(null);
        }

        blog.Title = Title;
        blog.Body  = HTMLUtility.FormatForHTML(Body);

        blog.Save();

        return(HTMLUtility.AutoLink(blog.Body));
    }