예제 #1
0
        private MsgBiz.MaterialRequirement CreateMaterialReq(MsgBiz.MaterialUseType use, string id, double quantity, string uom)
        {
            // This specifies the use of material certain, e.g., consume or produce.
            return(new MsgBiz.MaterialRequirement()
            {
                MaterialUse = new MsgBiz.MaterialUse(use),

                MaterialDefinitionIdentifiers = new SysColl.List <MsgBiz.IdentifierType>()
                {
                    new MsgBiz.IdentifierType(id)
                },

                Quantities = new SysColl.List <MsgBiz.QuantityValue>()
                {
                    new MsgBiz.QuantityValue(quantity)
                    {
                        UnitOfMeasure = uom
                    }
                }
            });
        }
예제 #2
0
        private MsgBiz.MaterialRequirement CreateMaterialReqForSchedule(MsgBiz.MaterialUseType use, string matId, double volume)
        {
            return(new MsgBiz.MaterialRequirement()
            {
                // How used
                MaterialUse = new MsgBiz.MaterialUse(use),

                // What used
                MaterialDefinitionIdentifiers = new SysColl.List <MsgBiz.IdentifierType>()
                {
                    new MsgBiz.IdentifierType(matId)
                },

                // How much
                Quantities = new SysColl.List <MsgBiz.QuantityValue>()
                {
                    new MsgBiz.QuantityValue(volume)
                    {
                        UnitOfMeasure = "m3"
                    }
                }
            });
        }