Пример #1
0
        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);
        }
Пример #2
0
        [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);
        }
Пример #3
0
        public void PutInventoryItemNam([FromBody] InventoryItem item)
        {
            IUpdateInventoryItem updateObject = new SaveInventoryItemData();

            updateObject.UpdateInventoryItemName(item);
        }
Пример #4
0
        [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);
        }
Пример #5
0
        public void InventoryItem([FromBody] InventoryItem item)
        {
            IAddInventoryItem addObject = new SaveInventoryItemData();

            addObject.AddInventoryItem(item);
        }