Esempio n. 1
0
        /// <summary>
        ///     设置供应商
        /// </summary>
        /// <param name="supplier">供应商</param>
        public void SetSupplier(Supplier supplier)
        {
            if (supplier == null || supplier.IsTransient())
            {
                throw new ArgumentException("供应商参数为空!");
            }

            Supplier = supplier;
            SupplierId = supplier.Id;
            SupplierName = supplier.CnName;
        }
Esempio n. 2
0
        /// <summary>
        ///     设置所有权人
        /// </summary>
        /// <param name="supplier">所有权人</param>
        public void SetSupplier(Supplier supplier)
        {
            if (supplier == null || supplier.IsTransient())
            {
                throw new ArgumentException("所有权人Id参数为空!");
            }

            Supplier = supplier;
            SupplierId = supplier.Id;
        }