public void UpdateBook()
        {
            BookInfo book = new BookInfo();

            Assert.IsTrue(book.UpdateBookInfo("A23", "12345", "111", "axb", Convert.ToDateTime("1999-1-1"), "1", 123, 123, "axb", "T"));
            DataSet ds = book.GetBookInfo("A23");

            Assert.IsNotNull(ds);
            Assert.AreEqual("12345", ds.Tables[0].Rows[0]["isbn"].ToString().Trim());
            Assert.AreEqual("111", 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(123, ds.Tables[0].Rows[0]["wordcount"]);
            Assert.AreEqual(Convert.ToInt16(123), ds.Tables[0].Rows[0]["pagecount"]);
            Assert.AreEqual("axb", ds.Tables[0].Rows[0]["publisher"]);
            Assert.AreEqual("T", ds.Tables[0].Rows[0]["classid"]);
        }
Exemple #2
0
 public bool UpdateBookInfo(string bookid, string isbn, string bookname, string author, DateTime publishdate, string bookversion, int wordcount, int pagecount, string publisher, string classid)
 {
     return(book.UpdateBookInfo(bookid, isbn, bookname, author, publishdate, bookversion, wordcount, pagecount, publisher, classid));
 }