Example #1
0
 bool BooksListByType(Book.BookTypes type)
 {
     System.Collections.Generic.List <Book> find = shop.FindBookByType(type);
     if (find.Count == 0)
     {
         return(false);
     }
     return(BooksListScreen(find));
 }
Example #2
0
 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);
 }
Example #3
0
 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());
 }