Exemplo n.º 1
0
        public ActionResult InventoryDetails(int id)
        {
            ViewData["AssetsManagement"] = "active";
            var viewModel = new InventoryDetailsViewModel()
            {
                Inventory      = assetsManagementService.GetSiteInventory(id),
                InventoryItems = assetsManagementService.GetSiteInventoryItemsByInventoryId(id)
            };

            return(View(viewModel));
        }
Exemplo n.º 2
0
 public IHttpActionResult GetItemsByInventoryId(int inventoryId)
 {
     if (inventoryId <= 0)
     {
         return(BadRequest("inventory Id cannot be found in the request body"));
     }
     try
     {
         return(Ok(assetsManagementService.GetSiteInventoryItemsByInventoryId(inventoryId)));
     }
     catch (Exception ex)
     {
         return(InternalServerError(ex));
     }
 }