示例#1
0
        public EditTradeCart(ListView listView, TradeCart cart)
        {
            this.listView = listView;
            this.cart = cart;

            InitializeComponent();

            this.discountTextBox = this.txtChangePrices;
            this.quantityTextBox = this.txtQuantity;
        }
示例#2
0
        /// <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);
                }
            }
        }
示例#3
0
        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");
        }