public IActionResult OnGetIncrease(long id)
        {
            var increase = new IncreaseInventory()
            {
                InventoryId = id
            };

            return(Partial("./Increase", increase));
        }
示例#2
0
        public IActionResult OnGetIncrease(long id)
        {
            var command = new IncreaseInventory
            {
                InventoryId = id
            };

            return(Partial("Increase", command));
        }
示例#3
0
        public IActionResult OnGetIncrement(long id)
        {
            var increaseInventory = new IncreaseInventory()
            {
                InventoryId = id
            };

            return(Partial("Increment", increaseInventory));
        }
示例#4
0
        public IActionResult OnPostIncrement(IncreaseInventory command)
        {
            var operationResult = new OperationResult();

            if (ModelState.IsValid)
            {
                operationResult = _inventoryApplication.Increase(command);
            }
            return(new JsonResult(operationResult));
        }
        public OperationResult Increase(IncreaseInventory command)
        {
            var operationResult = new OperationResult();
            var inventory       = _inventoryRepository.Get(command.InventoryId);

            if (inventory == null)
            {
                return(operationResult.Failed(QueryValidationMessage.NotFound));
            }
            inventory.Increase(command.Count, 1, command.Description);
            _inventoryRepository.SaveChanges();
            return(operationResult.Succeeded());
        }
示例#6
0
        public OperationResult Increase(IncreaseInventory command)
        {
            var operation = new OperationResult();
            var inventory = _inventoryRepository.Get(command.InventoryId);

            if (inventory == null)
            {
                return(operation.Failed(ApplicationMessages.RecordNotFound));
            }
            var operatorId = 1;

            inventory.Increase(command.Count, operatorId, command.Description);
            _inventoryRepository.SaveChanges();
            return(operation.Succedded());
        }
示例#7
0
        public OperationResult Increase(IncreaseInventory command)
        {
            var operationresult = new OperationResult();
            var inventory       = _inventoryRepo.Get(command.InventoryId);

            if (inventory == null)
            {
                return(operationresult.Failed(ApplicationMessage.recordNotFound));
            }

            const long OperationId = 1;

            inventory.Increase(command.Count, OperationId, command.Description);
            _inventoryRepo.Save();
            return(operationresult.Succeeded());
        }
示例#8
0
        public JsonResult OnPostIncrease(IncreaseInventory command)
        {
            var result = _inventoryApplication.Increase(command);

            return(new JsonResult(result));
        }