コード例 #1
0
        //ADD BOOK INTO BOOK TABLE => BL
        public string AddBookBL(string bookName, string bookAuthor, string bookISBN, double bookPrice, int bookCopies)
        {
            string isBookValid = BookValidate(bookName, bookAuthor, bookISBN, bookPrice, bookCopies);

            if (isBookValid == "true")
            {
                BookDAL bookDAL = new BookDAL();
                bool    isDone  = bookDAL.AddBookDAL(bookName, bookAuthor, bookISBN, bookPrice, bookCopies);
                if (isDone != true)
                {
                    return("Server error, ");
                }
                else
                {
                    return("true");
                }
            }
            else
            {
                return(isBookValid);
            }
        }