Esempio n. 1
0
        public ActionResult DeleteComment(string CommentId)
        {
            bool result = CommentManager.DeleteComment(CommentId);

            if (result)
            {
                ViewBag.message = "Comment successfully deleted.";
            }
            else
            {
                ViewBag.message = "Comment could not be deleted.";
            }

            return(View(CommentPersistence.GetUserComment(Session["UserId"].ToString())));
        }
Esempio n. 2
0
 public ActionResult DeleteComment()
 {
     return(View(CommentPersistence.GetUserComment(Session["UserId"].ToString())));
 }
Esempio n. 3
0
        /// <summary>
        /// Gets users comments.
        /// </summary>
        /// <param name="UserId">User that wants to see his/her comments.</param>
        /// <returns>Comments that user enters to cars.</returns>
        public static Comment[] GetUserComments(string UserId)
        {
            Comment[] comments = CommentPersistence.GetUserComment(UserId);

            return(comments);
        }