public void Delete(int id) { IGetInventoryItems readObject = new ReadInventoryItems(); List <InventoryItem> tempInventoryItems = new List <InventoryItem>(); tempInventoryItems = readObject.GetAllInventoryItems(); IDeleteInventoryItem deleteObject = new SaveInventoryItemData(); InventoryItem tempInventoryItem = new InventoryItem(); foreach (InventoryItem i in tempInventoryItems) { if (id == i.ItemID) { tempInventoryItem = i; } } deleteObject.DeleteInventoryItem(tempInventoryItem); }
[HttpPut("itemcheckedoutstatusreturned/{id}")]//I think this is how you decorate the http in order to update just checkedoutstatus public void PutItemCheckedOutStatusReturned(int id, [FromBody] InventoryItem item) { IUpdateInventoryItem updateObject = new SaveInventoryItemData(); updateObject.UpdateInventoryItemCheckedOutStatusReturned(item); }
public void PutInventoryItemNam([FromBody] InventoryItem item) { IUpdateInventoryItem updateObject = new SaveInventoryItemData(); updateObject.UpdateInventoryItemName(item); }
[HttpPut("itemcomments/{id}")] //I think this is how you decorate the http in order to update just comments public void PutItemComments(int id, [FromBody] InventoryItem item) { IUpdateInventoryItem updateObject = new SaveInventoryItemData(); updateObject.UpdateInventoryItemComments(item); }
public void InventoryItem([FromBody] InventoryItem item) { IAddInventoryItem addObject = new SaveInventoryItemData(); addObject.AddInventoryItem(item); }