public EditTradeCart(ListView listView, TradeCart cart) { this.listView = listView; this.cart = cart; InitializeComponent(); this.discountTextBox = this.txtChangePrices; this.quantityTextBox = this.txtQuantity; }
/// <summary> /// Prints items /// </summary> /// <param name="cart"></param> private void AutoPrintLabels(TradeCart cart) { // Only print labels if corresponding menu item is checked. if (printUPCLabelsAfterTradeTransactionToolStripMenuItem.Checked != true) return; foreach (Item item in cart.items) { if (DBaccess.IsItemInAutoPrintTable(item)) { // Print as many labels as the item quantity indicates Printer.PrintQuantityOfUPCLabels(item); } } }
private void POSinventory_Load(object sender, EventArgs e) { // Instantiate Carts cart = new Cart(lvCart, ListViewType.CART); tradeCart = new TradeCart (lvTradeCart, ListViewType.TRADECART); //load inventory into ListView PopulateLists(); // Initialize "total" labels lblCartTotal.Text = cart.cartTotal.ToString("C"); lblCashTotal.Text = tradeCart.cashTotal.ToString("C"); lblCreditTotal.Text = tradeCart.creditTotal.ToString("C"); }