//网数据库中写入一本书
 public static void WriteBook(int urlId, string name, int startIndex, int endIndex)
 {
     JY_Book b = new JY_Book();
     b.Name = name;
     JYBookDao dao = new JYBookDao();
     int result = dao.add(b);
     dao.Dispose();
     if (result <= 0)
         throw new ApplicationException("插入book错误!");
     for (int i = 1; i <= (endIndex - startIndex + 1); i++)
         WriteArticle(b.Id, urlId, startIndex + i - 1, i);
 }