Пример #1
0
        }//

        #region UI CLICKS
        private void UI_BTN_CLICKS(object sender, EventArgs e)
        {
            //
            Button input = (Button)sender;

            switch (input.Name)
            {
            case "clearOrderBtn":
            {
                this.clearAllItems();
                break;
            }

            case "removeItemBtn":
            {
                //int id = this.getCurrentSelectedIdFromGridView();
                //this.removeItemFromTheList(id);

                break;
            }

            case "completeOrder":
            {
                if (this.itemsListForReceipt.Count != 0)
                {
                    CompleteOrderForm frm = new CompleteOrderForm(this, this.itemsListForReceipt.ToList());
                    frm.ShowDialog();
                }
                break;
            }

            case "applyQtyBtn":
                int qty = Convert.ToInt32(qtyCounterNumericUpDown.Value);
                applyQtyToSelectedItem(qty);
                POSForm pf = (POSForm)this.ParentForm;
                pf.connect_receipt_2_store_clear_search_Key();
                break;

            case "x": break;    //applyQtyBtn
            }
        }
Пример #2
0
        public void Connector_in_shortcuts(string cmd)
        {
            switch (cmd)
            {
            case "ENTER":
                //MessageBox.Show("Enter pressed");
                break;

            case "TAB":
                if (this.itemsListForReceipt.Count != 0)
                {
                    CompleteOrderForm frm = new CompleteOrderForm(this, this.itemsListForReceipt.ToList());
                    frm.ShowDialog();
                }
                break;

            case "CLEAR":
                this.clearAllItems();
                break;

            case "QTY":
                this.qtyCounterNumericUpDown.Focus();
                break;

            case "APPLY_QTY":
                int qty = Convert.ToInt32(qtyCounterNumericUpDown.Value);
                applyQtyToSelectedItem(qty);
                break;

            case "TABLE":
                this.itemsForReceiptDataGridView.Focus();
                break;

            default: break;
            }
        }