public static bool Delete(int commentId) { CommentInfo commentInfo = dal.GetCommentInfo(commentId); if (dal.Delete(commentId)) { ContentManage.UpdateCommentAuditedAndUnaudited(commentInfo.GeneralId); CommentPKZone.DeleteByCommentId(commentId); return(true); } return(false); }
public static bool DeleteByUserName(int commentId) { string userName = PEContext.Current.User.UserName; CommentInfo commentInfo = dal.GetCommentInfo(commentId); if (((!commentInfo.IsNull && (commentInfo.UserName == userName)) && !commentInfo.Status) && dal.Delete(commentId, userName)) { ContentManage.UpdateCommentAuditedAndUnaudited(commentInfo.GeneralId); CommentPKZone.DeleteByCommentId(commentId); return(true); } return(false); }