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; }
public void DeleteFromList(BookViewModel book) { BooksList.Remove(book); SelectedBook = null; }
private void BooksList_SelectionChanged(object sender, EventArgs e) { BooksList.ClearSelection(); }
private void costBookUpper_SelectedIndexChanged(object sender, EventArgs e) { UpdatePanel(); BooksList.Focus(); }
private void genreBookList_SelectedIndexChanged(object sender, EventArgs e) { UpdatePanel(); BooksList.Focus(); }
public BooksList GetBookById(int BookId) { BooksList list = fbentities.BooksLists.Find(BookId); return(list); }