public void InsertMaintainWork(MaintainWorkDTO dto)
        {
            MaintainWork newMaintainWork = MaintainWorkFactory.CreateMaintainWork();

            newMaintainWork.SetWorkCode(dto.WorkCode);
            newMaintainWork.SetDescription(dto.Description);
            _maintainWorkRepository.Add(newMaintainWork);
        }
        public void ModifyMaintainWork(MaintainWorkDTO dto)
        {
            MaintainWork updateMaintainWork = _maintainWorkRepository.Get(dto.Id); //获取需要更新的对象。

            //更新。
            updateMaintainWork.SetWorkCode(dto.WorkCode);
            updateMaintainWork.SetDescription(dto.Description);
            _maintainWorkRepository.Modify(updateMaintainWork);
        }
 public void DeleteMaintainWork(MaintainWorkDTO dto)
 {
     MaintainWork delMaintainWork = _maintainWorkRepository.Get(dto.Id); //获取需要删除的对象。
     _maintainWorkRepository.Remove(delMaintainWork); //删除MaintainWork。
 }