private List <EoiType> GetEoiMaterials()
        {
            var result = new List <EoiType>();

            foreach (var material in Materials)
            {
                var eoiType = new EoiType();

                eoiType.Id       = material.Id;
                eoiType.Name     = material.Name;
                eoiType.Quantity = GetCalculatedMaterialQuantity(1, material);

                material.AddEoiType(eoiType);

                result.Add(eoiType);
            }

            return(result);
        }
        private List <EoiType> GetEoiProducts()
        {
            var result = new List <EoiType>();

            foreach (var product in Products)
            {
                var eoiType = new EoiType();

                eoiType.Id       = product.Id;
                eoiType.Name     = product.Name;
                eoiType.Quantity = GetProductQuantity(product);

                product.AddEoiType(eoiType);

                result.Add(eoiType);
            }

            return(result);
        }
Example #3
0
 internal void AddEoiType(EoiType type)
 {
     _eoiTypes.Add(type);
 }
Example #4
0
 internal EoiType GetEoiType(EoiType eoiType)
 {
     return(_eoiTypes.FirstOrDefault(x => Equals(eoiType, x)));
 }