public Book[] BookByTitle(String title) { Library lib = new Library(); lib.UpdateDB(); return lib.FindBooksByName(title); }
public Book[] BookByWriter(String writer) { Library lib = new Library(); lib.UpdateDB(); return lib.FindBooksByAuthor(writer); }
public Book BookByGUID(string GUID) { Library lib = new Library(); lib.UpdateDB(); return lib.FindBookByGUID(GUID); }
public Book[] AllBooks() { Library lib = new Library(); lib.UpdateDB(); return lib.Books.ToArray<Book>(); }
public bool AddUser(String username, String adress, String zipcode, String city, String password) { Library lib = new Library(); lib.UpdateDB(); return (lib.AddUserDB(username, adress, zipcode, city, password)); }
public bool VerifyUser(String username, String password) { Library lib = new Library(); lib.UpdateDB(); return lib.VerifyUser(username, password); }
public string RegisterOrder(string username, Book[] books, string creditcard, ContactDetails shipping, ContactDetails invoicing) { string guid = null; if (Order.VerifyCreditCard(creditcard) == true) { int i = 0; bool verifybook = true; Library lib = new Library(); lib.UpdateDB(); while (i < books.Length && verifybook == true) { verifybook = lib.Contains(books[i++]); } if (verifybook == true) { Order toregister = new Order(shipping, invoicing, creditcard, books); toregister.OrderSerializer(); toregister.OrderStorage(username); guid = toregister.Ordernumber; } } return guid; }