bool BooksListByType(Book.BookTypes type) { System.Collections.Generic.List <Book> find = shop.FindBookByType(type); if (find.Count == 0) { return(false); } return(BooksListScreen(find)); }
public System.Collections.Generic.List <Book> FindBookByType(Book.BookTypes type) { System.Collections.Generic.List <Book> arr = new System.Collections.Generic.List <Book>(10); foreach (var i in cargo) { Book book = i as Book; if (i == null) { continue; } if (book.type == type) { arr.Add(book); } } return(arr); }
public Book(System.Data.DataRow dr) : base(dr) { this.BookType = (Book.BookTypes)Enum.Parse(typeof(Book.BookTypes), dr["bookType"].ToString()); this.MaxPages = Convert.ToInt16(dr["maxPages"]); this.Pages = dr["pages"].ToString().Split(ProtocolYuusha.ISPLIT.ToCharArray()); }