public void ModifyMaintainPaymentSchedule(MaintainPaymentScheduleDTO maintainPaymentSchedule) { if (maintainPaymentSchedule == null) { throw new Exception("付款计划不能为空"); } var persistMaintainPayment = _paymentScheduleRepository.Get(maintainPaymentSchedule.MaintainPaymentScheduleId) as MaintainPaymentSchedule; if (persistMaintainPayment == null) { throw new Exception("找不到需要更新的付款计划"); } //更新维修付款计划 if (!persistMaintainPayment.SupplierId.Equals(maintainPaymentSchedule.SupplierId)) { persistMaintainPayment.SetSupplier(maintainPaymentSchedule.SupplierId, maintainPaymentSchedule.SupplierName); } if (!persistMaintainPayment.CurrencyId.Equals(maintainPaymentSchedule.CurrencyId)) { persistMaintainPayment.SetCurrency(maintainPaymentSchedule.CurrencyId); } UpdatePaymentSchedule(persistMaintainPayment, maintainPaymentSchedule.PaymentScheduleLines); //更新维修付款计划 }
public void DeleteMaintainPaymentSchedule(MaintainPaymentScheduleDTO maintainPaymentSchedule) { if (maintainPaymentSchedule == null) { throw new Exception("飞机付款计划不能为空"); } DeletePaymentSchedule(maintainPaymentSchedule.MaintainPaymentScheduleId); //删除维修付款计划 }
public void InsertMaintainPaymentSchedule(MaintainPaymentScheduleDTO maintainPaymentSchedule) { if (maintainPaymentSchedule == null) { throw new Exception("付款计划不能为空"); } PaymentSchedule newMaintainPaymentSchedule = PaymentScheduleFactory.CreateMaintainPaymentSchedule(maintainPaymentSchedule.SupplierName, maintainPaymentSchedule.SupplierId, maintainPaymentSchedule.CurrencyId); InsertPaymentSchedule(newMaintainPaymentSchedule, maintainPaymentSchedule.PaymentScheduleLines); //新增飞机付款计划 }