public void showWishlist(ref WishListDialog wd) { foreach (Book b in wishlist) { wd.AddDisplayItems(b.WishlistString()); } }
public void updateWishListDialog(WishListDialog wld) { foreach (Book displayBook in LoggedinCustomer.wishList) { wld.AddDisplayItems("\"" + displayBook.name + "\" BY " + displayBook.author); } }
public void DisplayWishlist(ref WishListDialog wd) { if (!loggedOn) { throw new BookShopException("This operation requires login."); } currentCustomer.showWishlist(ref wd); }
public void updateWishListDialog(BookInWishListDialog bws, WishListDialog wishListDialog) { bws.BookTitle = LoggedinCustomer.wishList[wishListDialog.SelectedIndex].name; bws.Author = LoggedinCustomer.wishList[wishListDialog.SelectedIndex].author; bws.Publisher = LoggedinCustomer.wishList[wishListDialog.SelectedIndex].publisher; bws.ISBN = LoggedinCustomer.wishList[wishListDialog.SelectedIndex].isbn; bws.Date = LoggedinCustomer.wishList[wishListDialog.SelectedIndex].date; bws.Price = LoggedinCustomer.wishList[wishListDialog.SelectedIndex].price; bws.Stock = LoggedinCustomer.wishList[wishListDialog.SelectedIndex].stock; }
// XXX You may add overriding constructors (constructors with different set of arguments). // If you do so, make sure to call :this() // public CustomerWindow(XXX xxx): this() { } // Without :this(), InitializeComponent() is not called private void CustomerWindow_Load(object sender, EventArgs e) { customerDialog = new CustomerDialog(); loginDialog = new LoginDialog(); listBooksDialog = new ListBooksDialog(); bookInformationDialog = new BookInformationDialog(); cartDialog = new CartDialog(); wishListDialog = new WishListDialog(); bookInWishListDialog = new BookInWishListDialog(); listTransactionHistoryDialog = new ListTransactionHistoryDialog(); showTransactionDialog = new ShowTransactionDialog(); }