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()))); }
public ActionResult DeleteComment() { return(View(CommentPersistence.GetUserComment(Session["UserId"].ToString()))); }
/// <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); }