Beispiel #1
0
        /// <summary>
        ///     设置合同飞机
        /// </summary>
        /// <param name="contractAircraft">合同飞机</param>
        public void SetContractAircraf(ContractAircraft contractAircraft)
        {
            if (contractAircraft == null || contractAircraft.IsTransient())
            {
                throw new ArgumentException("合同飞机参数为空!");
            }

            ContractAircraftId = contractAircraft.Id;
        }
Beispiel #2
0
        /// <summary>
        ///     添加合同飞机BFE
        /// </summary>
        /// <param name="contractAircraft">合同飞机</param>
        /// <returns></returns>
        public ContractAircraftBFE AddNewContractAircraft(ContractAircraft contractAircraft)
        {
            if (contractAircraft == null || contractAircraft.IsTransient())
            {
                throw new ArgumentException("合同飞机参数为空!");
            }

            var contractAircraftBFE = new ContractAircraftBFE
            {
                BFEPurchaseOrderId = Id,
                BFEPurchaseOrder = this,
                ContractAircraftId = contractAircraft.Id,
                ContractAircraft = contractAircraft
            };

            ContractAircraftBfes.Add(contractAircraftBFE);

            return contractAircraftBFE;
        }