コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 internal void AddEoiType(EoiType type)
 {
     _eoiTypes.Add(type);
 }
コード例 #4
0
 internal EoiType GetEoiType(EoiType eoiType)
 {
     return(_eoiTypes.FirstOrDefault(x => Equals(eoiType, x)));
 }