Example #1
0
        public void InsertNewBook()
        {
            BookInfo book = new BookInfo();

            Assert.IsTrue(book.InsertNewBook("t4050000", "12345678912360", "axb", "axb", Convert.ToDateTime("1999-1-1"), "1", 12, 12, "axb", "T"));
            DataSet ds = book.GetBookInfo("t4050000");

            Assert.IsNotNull(ds);
            Assert.AreEqual("12345678912360", ds.Tables[0].Rows[0]["isbn"].ToString().Trim());
            Assert.AreEqual("axb", ds.Tables[0].Rows[0]["bookname"]);
            Assert.AreEqual("axb", ds.Tables[0].Rows[0]["author"]);
            Assert.AreEqual(Convert.ToDateTime("1999-1-1"), ds.Tables[0].Rows[0]["publishdate"]);
            Assert.AreEqual("1", ds.Tables[0].Rows[0]["bookversion"]);
            Assert.AreEqual(12, ds.Tables[0].Rows[0]["wordcount"]);
            Assert.AreEqual(Convert.ToInt16(12), ds.Tables[0].Rows[0]["pagecount"]);
            Assert.AreEqual("axb", ds.Tables[0].Rows[0]["publisher"]);
            Assert.AreEqual("T", ds.Tables[0].Rows[0]["classid"]);
        }
Example #2
0
 public bool InsertNewBook(string bookid, string isbn, string bookname, string author, DateTime publishdate, string bookversion, int wordcount, int pagecount, string publisher, string classid)
 {
     return(book.InsertNewBook(bookid, isbn, bookname, author, publishdate, bookversion, wordcount, pagecount, publisher, classid));
 }