예제 #1
0
 public async Task <IActionResult> OnReceivePost(InventoryReceiveListViewModel vm)
 {
     if (ModelState.IsValid)
     {
         var ids  = vm.ReceiveItems.Select(i => i.Id).ToList();
         var qtys = vm.ReceiveItems.Select(i => i.Qty).ToList();
         if (await _partsService.TryReceiveShipment(ids, qtys))
         {
             return(Ok());
         }
     }
     return(NotFound("There was an error handling your request. Please try again and if the problem persists, contact site administation."));
 }