public static void WriteArticle(int bookId, int bookUrlId, int articleUrlId, int sequnce) { HtmlDocument doc = ParserUtil.GetHtmlDocument(string.Format(url, bookUrlId, articleUrlId), Encoding.UTF8); HtmlNode html = doc.DocumentNode; JY_Article a = new JY_Article(); a.Content = html.CssSelect("div.contentbox").First().InnerHtml; a.Title = html.CssSelect("div.h1title").First().InnerHtml; a.TheSequnce = sequnce; a.JY_BookId = bookId; JYArticleDao dao = new JYArticleDao(); dao.add(a); dao.Dispose(); }