예제 #1
0
 public void showWishlist(ref WishListDialog wd)
 {
     foreach (Book b in wishlist)
     {
         wd.AddDisplayItems(b.WishlistString());
     }
 }
예제 #2
0
 public void updateWishListDialog(WishListDialog wld)
 {
     foreach (Book displayBook in LoggedinCustomer.wishList)
     {
         wld.AddDisplayItems("\"" + displayBook.name + "\" BY " + displayBook.author);
     }
 }
예제 #3
0
 public void DisplayWishlist(ref WishListDialog wd)
 {
     if (!loggedOn)
     {
         throw new BookShopException("This operation requires login.");
     }
     currentCustomer.showWishlist(ref wd);
 }
예제 #4
0
 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;
 }
예제 #5
0
 // 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();
 }