Example #1
0
        public Book TakeBook(string bookName)
        {
            Book currentBook = null;
            for (int i = 0; i < booksList.ElementsCount; i++)
            {
                if (booksList[i].BookName.Equals(bookName)) currentBook = booksList[i];
            }
            Book[] books = booksList.Remove(currentBook);

            booksList = new BooksList<Book>();
            for (int i = 0; i < books.Length; i++)
            {
                booksList.Add(books[i]);
            }

            Console.WriteLine(bookName + " is already taken!");

            if (evt != null)
                evt(currentBook, false);
            return currentBook;
        }
Example #2
0
 public void DeleteFromList(BookViewModel book)
 {
     BooksList.Remove(book);
     SelectedBook = null;
 }
Example #3
0
 private void BooksList_SelectionChanged(object sender, EventArgs e)
 {
     BooksList.ClearSelection();
 }
Example #4
0
 private void costBookUpper_SelectedIndexChanged(object sender, EventArgs e)
 {
     UpdatePanel();
     BooksList.Focus();
 }
Example #5
0
 private void genreBookList_SelectedIndexChanged(object sender, EventArgs e)
 {
     UpdatePanel();
     BooksList.Focus();
 }
Example #6
0
        public BooksList GetBookById(int BookId)
        {
            BooksList list = fbentities.BooksLists.Find(BookId);

            return(list);
        }