//ADDING BOOK INTO BOOK TABLE =>BLL public void AddBookBLL(int bookId, string bookName, string bookAuthor, int bookCopies) { bool isValidated = BookValidation(bookId, bookName, bookAuthor, bookCopies); if (isValidated) { /*BookDAL dalBook = new BookDAL();*/ bool isDone = dalBook.AddBooksDAL(bookId, bookName, bookAuthor, bookCopies); if (isDone == true) { Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("Book added successfully..."); Console.ForegroundColor = ConsoleColor.White; } else { Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("Try again..."); Console.ForegroundColor = ConsoleColor.White; } } else { Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("Try again..."); Console.ForegroundColor = ConsoleColor.White; } }
public void AddBookBLL(int bookId, string bookName, string BookAuthorName, string BookAuthorSurname, DateTime BookDate) { bool isValidated = BookValidation(bookId, bookName, BookAuthorName, BookAuthorSurname, BookDate); if (isValidated) { /*BookDAL dalBook = new BookDAL();*/ bool isDone = dalBook.AddBooksDAL(bookId, bookName, BookAuthorName, BookAuthorSurname, BookDate); if (isDone == true) { Console.WriteLine("Książka została dodana"); } else { Console.WriteLine("Spróbuj ponownie"); } } else { Console.WriteLine("Spróbuj ponownie"); } }