示例#1
0
 /// <summary>
 /// Retrieve list of Inventory.
 /// no parameters required to be passed in.
 /// </summary>
 /// <returns>List of Inventory</returns>
 public InventoryList GetAll()
 {
     using (InventoryDataAccess data = new InventoryDataAccess(ClientContext))
     {
         return(data.GetAll());
     }
 }
示例#2
0
        /// <summary>
        /// Retrieve list of Inventory.
        /// </summary>
        /// <param name="fillChild"></param>
        /// <returns>List of Inventory</returns>
        public InventoryList GetAll(bool fillChild)
        {
            InventoryList inventoryList = new InventoryList();

            using (InventoryDataAccess data = new InventoryDataAccess(ClientContext))
            {
                inventoryList = data.GetAll();
            }
            if (fillChild)
            {
                foreach (Inventory inventoryObject in inventoryList)
                {
                    FillInventoryWithChilds(inventoryObject, fillChild);
                }
            }
            return(inventoryList);
        }