Пример #1
0
    public AjaxComment PostComment(string type, string WebID, string CommentText)
    {
        AjaxComment ajaxComment = new AjaxComment();

        member = (Member)Session["Member"];

        if (type == "n")
        {
            NSpot nspot = NSpot.GetNSpotByNSpotWebID(WebID);

            NSpotComment comment = new NSpotComment();

            comment.NSpotID   = nspot.NSpotID;
            comment.MemberID  = member.MemberID;
            comment.Text      = CommentText;
            comment.DTCreated = DateTime.Now;

            comment.Save();

            ajaxComment = AjaxComment.GetAjaxNSpotCommentByNSpotCommentIDWithJoin(comment.NSpotCommentID);

            ajaxComment.TotalNumberOfComments = "0";
        }


        return(ajaxComment);
    }