Exemplo n.º 1
0
 public void DeleteEnginePaymentSchedule(EnginePaymentScheduleDTO eginePaymentSchedule)
 {
     if (eginePaymentSchedule == null)
     {
         throw new Exception("发动机付款计划不能为空");
     }
     DeletePaymentSchedule(eginePaymentSchedule.EnginePaymentScheduleId);
 }
Exemplo n.º 2
0
        public void ModifyEnginePaymentSchedule(EnginePaymentScheduleDTO eginePaymentSchedule)
        {
            if (eginePaymentSchedule == null)
            {
                throw new Exception("发动机付款计划不能为空");
            }
            var persistEnginePayment =
                _paymentScheduleRepository.Get(eginePaymentSchedule.EnginePaymentScheduleId) as EnginePaymentSchedule;
            if (persistEnginePayment == null)
            {
                throw new Exception("找不到需要更新的付款计划");
            }
            //更新飞机付款计划
            if (!persistEnginePayment.SupplierId.Equals(eginePaymentSchedule.SupplierId))
            {
                persistEnginePayment.SetSupplier(eginePaymentSchedule.SupplierId, eginePaymentSchedule.SupplierName);
            }
            if (!persistEnginePayment.CurrencyId.Equals(eginePaymentSchedule.CurrencyId))
            {
                persistEnginePayment.SetCurrency(eginePaymentSchedule.CurrencyId);
            }
            if (!persistEnginePayment.ContractEngineId.Equals(eginePaymentSchedule.ContractEngineId))
            {
                persistEnginePayment.SetContractEngine(eginePaymentSchedule.ContractEngineId);
            }

            UpdatePaymentSchedule(persistEnginePayment, eginePaymentSchedule.PaymentScheduleLines); //更新发动机付款计划
        }
Exemplo n.º 3
0
        public void InsertEnginePaymentSchedule(EnginePaymentScheduleDTO eginePaymentSchedule)
        {
            if (eginePaymentSchedule == null)
            {
                throw new Exception("发动机付款计划不能为空");
            }

            PaymentSchedule newEnginePaymentSchedule =
                PaymentScheduleFactory.CreateEnginePaymentSchedule(eginePaymentSchedule.SupplierName,
                    eginePaymentSchedule.SupplierId,
                    eginePaymentSchedule.CurrencyId,
                    eginePaymentSchedule.ContractEngineId);
            InsertPaymentSchedule(newEnginePaymentSchedule, eginePaymentSchedule.PaymentScheduleLines); //新增发动机付款计划
        }