public async Task<bool> DeleteComment(CommentInfo comment) { var queryData = new Dictionary<string, string>(); queryData.Add("bo_table", comment.Table); queryData.Add("comment_id", comment.CommentID.ToString()); string response = await Broker.FetchPage("http://www.clien.net/cs2/bbs/delete_comment.php", queryData, HttpBroker.Method.Get); // 글에서 글번호를 발견하면 성공 if (response.IndexOf("wr_id=" + comment.ArticleID) >= 0) { return true; } else { return false; } }
public async Task<bool> UpdateComment(CommentInfo comment, string message) { var postData = new Dictionary<string, string>(); postData.Add("w", "cu"); postData.Add("bo_table", comment.Table); postData.Add("wr_id", comment.ArticleID.ToString()); postData.Add("comment_id", comment.CommentID.ToString()); postData.Add("wr_content", message); string response = await Broker.FetchPage("http://www.clien.net/cs2/bbs/write_comment_update.php", postData, HttpBroker.Method.Post); // 글에서 다시 코멘트 번호로 이동하는것 변경(업데이트 성공) if (response.IndexOf("#c_" + comment.CommentID.ToString()) > 0) { return true; } else { return false; } }