Exemplo n.º 1
0
        public void InsertStandardPaymentSchedule(StandardPaymentScheduleDTO standardPaymentSchedule)
        {
            if (standardPaymentSchedule == null)
            {
                throw new Exception("付款计划不能为空");
            }

            PaymentSchedule newStandardPaymentSchedule =
                PaymentScheduleFactory.CreateStandardPaymentSchedule(standardPaymentSchedule.SupplierName,
                    standardPaymentSchedule.SupplierId,
                    standardPaymentSchedule.CurrencyId,
                    standardPaymentSchedule.OrderId);
            InsertPaymentSchedule(newStandardPaymentSchedule, standardPaymentSchedule.PaymentScheduleLines); //新增飞机付款计划
        }
Exemplo n.º 2
0
        public void ModifyStandardPaymentSchedule(StandardPaymentScheduleDTO standardPaymentSchedule)
        {
            if (standardPaymentSchedule == null)
            {
                throw new Exception("付款计划不能为空");
            }
            var persistStandardPayment =
                _paymentScheduleRepository.Get(standardPaymentSchedule.StandardPaymentScheduleId) as
                    StandardPaymentSchedule;
            if (persistStandardPayment == null)
            {
                throw new Exception("找不到需要更新的付款计划");
            }
            //更新标准付款计划
            if (!persistStandardPayment.SupplierId.Equals(standardPaymentSchedule.SupplierId))
            {
                persistStandardPayment.SetSupplier(standardPaymentSchedule.SupplierId,
                    standardPaymentSchedule.SupplierName);
            }
            if (!persistStandardPayment.CurrencyId.Equals(standardPaymentSchedule.CurrencyId))
            {
                persistStandardPayment.SetCurrency(standardPaymentSchedule.CurrencyId);
            }
            if (!persistStandardPayment.OrderId.Equals(standardPaymentSchedule.OrderId))
            {
                persistStandardPayment.SetOrderId(standardPaymentSchedule.OrderId);
            }

            UpdatePaymentSchedule(persistStandardPayment, standardPaymentSchedule.PaymentScheduleLines); //更新标准付款计划
        }
Exemplo n.º 3
0
 public void DeleteStandardPaymentSchedule(StandardPaymentScheduleDTO standardPaymentSchedule)
 {
     if (standardPaymentSchedule == null)
     {
         throw new Exception("飞机付款计划不能为空");
     }
     DeletePaymentSchedule(standardPaymentSchedule.StandardPaymentScheduleId); //删除标准付款计划
 }