Пример #1
0
        public async Task <IEnumerable <InventoryUseList> > GetUndistributedListAsync()
        {
            var loggedInUserID = _userService.GetCurrentUserId();

            CoreServiceDevReference.CoreServiceClient coreServiceClient = new CoreServiceDevReference.CoreServiceClient();

            var distributableInventory = await coreServiceClient.GetDistributableInventoryForUserAsync(int.Parse(loggedInUserID), false);

            List <InventoryUseList> distributableInventoryList = new List <InventoryUseList>();

            foreach (var inv in distributableInventory)
            {
                var invUseList = new InventoryUseList();
                List <InventoryUse> inventoryUseList = new List <InventoryUse>();
                foreach (var assForms in inv.AssessmentForms)
                {
                    invUseList.ProductName = assForms.ProductFamily;
                    foreach (var reportForm in assForms.ReportForms)
                    {
                        var invUse = new InventoryUse();
                        invUse.ProductName = assForms.ProductFamily;
                        invUse.Name        = reportForm.Name;
                        invUse.Uses        = reportForm.Count;
                        inventoryUseList.Add(invUse);
                    }
                    invUseList.InventoryUses = inventoryUseList;
                    distributableInventoryList.Add(invUseList);
                }
            }
            return(distributableInventoryList);
        }
Пример #2
0
    private void Awake()
    {
        instance = this;
        item     = ItemList.instance;

        for (int j = 0; j < 8; j++)
        {
            itemList[j] = null;
        }
    }