Example #1
0
        private async Task DistributeServantInventory(IEnumerable <Grade> gradeDescriptions, Company company, List <List <ServantAllocation> > servantDistribution)
        {
            var gradeDescriptionsSorted = DispositionListReporter.SortGradeList(gradeDescriptions);

            for (var i = 0; i < gradeDescriptionsSorted.Count; i++)
            {
                await _servantInventoryService.DistributeGradeForCompany(company.Name, gradeDescriptionsSorted[i].GetValueFromDescription <Grade>(),
                                                                         new GradeDistribution
                {
                    Distribution = servantDistribution[i]
                });
            }
        }
Example #2
0
        private async Task DistributeMaterialInventory(IEnumerable <Material.Material> materials, Company company, List <List <MaterialAllocation> > materialDistribution)
        {
            var materialsSorted = DispositionListReporter.SortMaterialList(materials);

            for (var i = 0; i < materialsSorted.Count; i++)
            {
                await _materialInventoryService.DistributeMaterialForCompany(company.Name, materialsSorted[i].SapNr,
                                                                             new MaterialDistribution
                {
                    Distribution = materialDistribution[i]
                });
            }
        }