Beispiel #1
0
        private void ItemColumn_KeyPress(object sender, CellKeyPressEventArgs args)
        {
            if (gridNavigator.ColumnKeyPress(args, colItem.Index, ItemColumnChoose,
                                             ItemColumnEvaluate, ItemColumnEditPrev, ItemColumnEditNext))
            {
                return;
            }

            string gdkKey = KeyShortcuts.KeyToString(args.EventKey);
            string quickGoods;

            if (!BusinessDomain.QuickItems.TryGetValue(gdkKey, out quickGoods))
            {
                return;
            }

            ItemColumnEvaluate(grid.EditedCell.Row, quickGoods);

            QtyColumnEvaluate(grid.EditedCell.Row, 1);

            if (selectedDetails.Count <= grid.EditedCell.Row + 1)
            {
                selectedDetails.Add(new SaleDetail());
            }

            EditGridCell(grid.EditedCell.Row + 1, colItem.Index);

            args.MarkAsHandled();
        }
        private void MatItem_KeyPress(object sender, CellKeyPressEventArgs args)
        {
            if (GridNavigator.ColumnKeyPress(args, colItem.Index, MatItemChoose,
                                             MatItemEvaluate, MatItemEditPrev, MatItemEditNext))
            {
                return;
            }

            string gdkKey = KeyShortcuts.KeyToString(args.EventKey);
            string quickGoods;

            if (!BusinessDomain.QuickItems.TryGetValue(gdkKey, out quickGoods))
            {
                return;
            }

            if (!MatItemEvaluate(grdMaterials.EditedCell.Row, quickGoods))
            {
                return;
            }

            MatQtyEvaluate(grdMaterials.EditedCell.Row, 1);

            if (recipe.DetailsMat.Count <= grdMaterials.EditedCell.Row + 1)
            {
                recipe.AddNewDetail();
            }

            MatEditGridField(grdMaterials.EditedCell.Row + 1, colItem.Index);

            args.MarkAsHandled();
        }
 private void MatQty_KeyPress(object sender, CellKeyPressEventArgs args)
 {
     GridNavigator.ColumnKeyPress(args, colQuantity.Index,
                                  MatQtyEvaluate, MatQtyEditPrev, MatQtyEditNext);
 }
Beispiel #4
0
 private void ColumnItem_KeyPressEvent(object sender, CellKeyPressEventArgs args)
 {
     gridNavigator.ColumnKeyPress(args, args.Cell.Column, ItemColumnChoose,
                                  ItemColumnEvaluate, ItemsColumnEditPrev, ItemColumnEditNext);
 }