public DataTable getDataTableBookAds() { string cmd = "SELECT * FROM BookAd"; DataTable dt = new DataTable(); dt = BookAdDb.ReadDt(cmd); return(dt); }
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); }
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); } }
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); }
public BookAd getBookAd(string cmd) { BookAd book = BookAdDb.getBookAd(cmd); return(book); }