コード例 #1
0
 public IActionResult CheckOutItem([FromBody] CheckInOutVMForCreate checkInOutVMForCreate)
 {
     if (checkInOutVMForCreate.Quantity > 0)
     {
         string user = User.Identity.Name;
         _checkOutService.CheckOut(checkInOutVMForCreate, user);
         return(Ok(checkInOutVMForCreate.ItemId));
     }
     return(BadRequest("Quantity invalid value."));
 }
コード例 #2
0
 public IActionResult CheckOutItem(ItemForCheckInOutListVM itm)
 {
     _checkInOutService.CheckOut(itm.Id, itm.CheckInOutQty, User.Identity.Name);
     return(RedirectToAction("ItemsCheckOutList"));
 }