Example #1
0
 public ActionResult AddQuantity(ItemAdded itemAdded)
 {
     InventoryClient client = new InventoryClient();
     client.DbAddQuantity(itemAdded.Item.ItemId, itemAdded.QuantityAdded);
     
     return RedirectToAction("Index");
 }
Example #2
0
 public ActionResult AddQuantity(int Id)
 {
     InventoryClient client = new InventoryClient();
     var item = client.GetItems().FirstOrDefault(m => m.ItemId == Id);
     ItemAdded itemAdded = new ItemAdded();
     itemAdded.Item = client.GetItems().FirstOrDefault(m => m.ItemId == Id);
     itemAdded.QuantityAdded = 0;
     return View(itemAdded);
 }
Example #3
0
 public ActionResult AddQuantity(int Id)
 {
     InventoryClient client = new InventoryClient();
     //Todo: Add to the server a more efficient way to get a specific item based on ItemId
     //var item = client.DbGetItems().FirstOrDefault(m => m.ItemId == Id);
     ItemAdded itemAdded = new ItemAdded();
     itemAdded.Item = client.DbGetItems().FirstOrDefault(m => m.ItemId == Id);
     itemAdded.QuantityAdded = 0;
     return View(itemAdded);
 }