Пример #1
0
        /// <summary>
        ///     设置BFE物料
        /// </summary>
        /// <param name="bfeMaterial">BFE物料</param>
        public void SetBFEMaterial(BFEMaterial bfeMaterial)
        {
            if (bfeMaterial == null || bfeMaterial.IsTransient())
            {
                throw new ArgumentException("BFE物料参数为空!");
            }

            BFEMaterial = bfeMaterial;
            BFEMaterialId = bfeMaterial.Id;
        }
Пример #2
0
 /// <summary>
 ///     创建BFE物料
 /// </summary>
 /// <returns>BFE物料</returns>
 public static BFEMaterial CreateBFEMaterial(string name, string description, string pn)
 {
     var bfeMaterial = new BFEMaterial
     {
         Description = description,
         Name = name,
         Pn = pn
     };
     bfeMaterial.GenerateNewIdentity();
     return bfeMaterial;
 }