Example #1
0
        public DataTable getDataTableBookAds()
        {
            string    cmd = "SELECT * FROM BookAd";
            DataTable dt  = new DataTable();

            dt = BookAdDb.ReadDt(cmd);
            return(dt);
        }
Example #2
0
        public List <BookAd> getAllBookAds()
        {
            string        cmd     = "SELECT * FROM BookAd";
            List <BookAd> newList = new List <BookAd>(BookAdDb.Read(cmd));

            //newList.Find(item => item.title == "Title");
            return(newList);
        }
Example #3
0
        public static void TestBooksRead()
        {
            string cmd   = "SELECT * FROM BookAd";
            var    books = BookAdDb.Read(cmd);

            Console.WriteLine("Writing existing books..");
            foreach (BookAd i in books)
            {
                Console.WriteLine("{0} av {1}, ISBN: {2}", i.title, i.author, i.isbn);
            }
        }
Example #4
0
 public void addBookAd(string title, string author, string isbn, string date, int price, string adtext, string course, string mail)
 {
     BookAdDb.Insert(title, author, isbn, date, price, adtext, course, mail);
 }
Example #5
0
        public BookAd getBookAd(string cmd)
        {
            BookAd book = BookAdDb.getBookAd(cmd);

            return(book);
        }