Beispiel #1
0
        public string RequestForThisBook(Book book, BookReader reader)
        {
            BookGateway aBookGateway = new BookGateway();

            if (aBookGateway.CheckIfthisBookExist(book))
            {
                if (aBookGateway.CheckBookQuantity(book) > 0)
                {
                    if (aRequestGateway.RequestForThisBook(book, reader))
                    {
                        return("Request Successfull");
                    }
                    else
                    {
                        return("Error found");
                    }
                }
                else
                {
                    return("Not Available now");
                }
            }
            else
            {
                return("This book is not exist in the library");
            }
        }
Beispiel #2
0
 public string SaveThisBook(DAL.DAO.Book aBook)
 {
     if (aBookGateway.CheckIfthisBookExist(aBook))
     {
         return("This Book is already exist");
     }
     else
     {
         if (aBookGateway.SaveThisBook(aBook))
         {
             return("Saved");
         }
         return("not saved");
     }
 }