private void loadCartItems() { List <InventoryItem> items = SessionVariableManager.getUserCart(); if (items != null) { printItemsToPlaceHolder(items); } else { } }
private void setUpUserPanel() { userPanel.Visible = true; String username = Security.getUsername(); lblMsg.Text = "Welcome back " + username + "!"; List <InventoryItem> items = SessionVariableManager.getUserCart(); if (items != null) { int itemCount = items.Count(); double price = 0; foreach (InventoryItem i in items) { price += i.getSalePrice(); } lblCartItems.Text = "You have " + itemCount + " item(s) in your cart with a total of " + string.Format("{0:C}", price) + "."; } }