protected void rptComment_ItemCommand(object source, RepeaterCommandEventArgs e) { if (e.CommandName == "Remove") { var commentId = Convert.ToInt32(e.CommandArgument); var userpostindex = e.Item.ItemIndex; BLL.Comment selecteduserpost = CommentDAO.GetCommentById(commentId); if (currentUser.Id == selecteduserpost.UserId) { CommentDAO.DeleteComment(commentId); refreshGv(); } } }
public static EAD_Project.PMS.Entities.CommentDTO GetCommentById(int pid) { return(CommentDAO.GetCommentById(pid)); }