Exemple #1
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();
 }
        public void showPastCartInformation(ShowTransactionDialog cart, Transaction tran)
        {
            if (!isCustomerLoggedIn)
            {
                throw new NullReferenceException("You are not logged in.");
            }

            for (int i = 0; i < tran.subTransactionCount; i++)
            {
                cart.AddDisplayItems(tran.itemsPurchased[i].ToString());
            }
            cart.AddDisplayItems("=======================================================");
            cart.AddDisplayItems("Total Price : $" + tran.totalPrice);
        }