public void ModifyEngineMaintainContract(EngineMaintainContractDTO engineMaintainContract)
 {
     MaintainContract updateEngineMaintainContract =
         _contractRepository.Get(engineMaintainContract.EngineMaintainContractId); //获取需要更新的对象。
     MaintainContractFactory.SetMaintainContract(updateEngineMaintainContract, engineMaintainContract.Name,
         engineMaintainContract.Number, engineMaintainContract.Signatory,
         engineMaintainContract.SignDate, engineMaintainContract.Abstract, engineMaintainContract.SignatoryId,
         engineMaintainContract.DocumentId, engineMaintainContract.DocumentName);
     _contractRepository.Modify(updateEngineMaintainContract);
 }
 public void DeleteEngineMaintainContract(EngineMaintainContractDTO engineMaintainContract)
 {
     MaintainContract deleteEngineMaintainContract =
         _contractRepository.Get(engineMaintainContract.EngineMaintainContractId); //获取需要删除的对象。
     _contractRepository.Remove(deleteEngineMaintainContract); //删除发动机维修合同。
 }
 public void InsertEngineMaintainContract(EngineMaintainContractDTO engineMaintainContract)
 {
     EngineMaintainContract newEngineMaintainContract = MaintainContractFactory.CreateEngineMaintainContract();
     MaintainContractFactory.SetMaintainContract(newEngineMaintainContract, engineMaintainContract.Name,
         engineMaintainContract.Number, engineMaintainContract.Signatory,
         engineMaintainContract.SignDate, engineMaintainContract.Abstract, engineMaintainContract.SignatoryId,
         engineMaintainContract.DocumentId, engineMaintainContract.DocumentName);
     _contractRepository.Add(newEngineMaintainContract);
 }