public bool DecreaseFromInventory(List <OrderItem> items)
        {
            var command = items.Select(orderItem => new DecreaseInventory
                                           (orderItem.ProductId, orderItem.Count, "خرید مشتری", orderItem.OrderId))
                          .ToList();

            return(_inventoryApplication.Decrease(command).IsSuccedded);
        }
Esempio n. 2
0
        public IActionResult OnPostDecrement(DecreaseInventory command)
        {
            var operationResult = new OperationResult();

            if (ModelState.IsValid)
            {
                operationResult = _inventoryApplication.Decrease(command);
            }
            return(new JsonResult(operationResult));
        }
Esempio n. 3
0
        public IActionResult OnPostDecrease(DecreaseInventoryVM command)
        {
            var result = _inventoryApplication.Decrease(command);

            return(new JsonResult(result));
        }
        public JsonResult OnPostDecrease(InventoryDecrease decrease)
        {
            var result = _inventoryApplication.Decrease(decrease);

            return(new JsonResult(result));
        }